in reply to Re: file basics
in thread file basics

Thank you Mr.Repellent;At first i tried it with a file which already existed in the system thinking that it was a file with .txt extension.And then i got the error "file does not exist", so i decided to seek some help and hence posted my question modified, Got reply from you and tried to figure what was wrong, I found that the file which i used didn't have any extension on it. It now works.Thanks for enlightening me with What have you tried? and also for answering my dumb question

Replies are listed 'Best First'.
Re^3: file basics
by Anonymous Monk on Mar 12, 2012 at 12:41 UTC

    The problem you probably ran into was that you used double quotes for your file name. (File extensions probably had nothing to do with it.) Since Windows's path separators are backslashes, and backslashes are a special character inside double quotes, this is many a beginner's stumbling-block. There are two easy fixes: use forward slashes (they work even on Windows), or use single quotes.

      Thanks Monk, Both these ways helped me solve the problem, but when i tried without file extensions i got the error "Error in open:no such file or directory" by using either forward slashes or single quotes in the windows path