but its just not working
What's not working then? Does it compile? What's your output?
Nick Evan
Not a Llama
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
although Ive opened the file using object.open("") the condition to check that there is indeed an open file always fails and i get my else message "file could not be found"
make sure the file d.txt is in the same directory (folder) as that the executable file is running. If they are not in the same directory then give the full path to the file in the open() function, for example if the file is located in c:\mydir then open the file like this: file.open("c:\\mydir\\d.txt");
the above assumes you are working on MS-Windows, if you are on *nix file.open("/mydir/d.txt");
Ancient Dragon
Retired & Loving It
30,050 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343