I've got a problem that has been troubling me for nearly a week. It was an exercise given out in class (not as homework) for us to try and find the answer to. The question is:
"Write a program that prompts the user to enter the name of a file, and then determines whether or not that file exists. The program should not alter the contents of the file (if it does exist) in any way.
For simplicity, check only the directory/folder in which your program exists (so do not worry about drives, directory path names and so on).
Hint: A promising way to do this would be to attempt to open the file and observe results."
I've created a file called 'hello.txt' and put it in a seperate folder called 'Test Folder' and tried to get it to work so many times but I'm getting no where. Any ideas?