Identifying if a certain file already exsists
Posted on 2001-06-22
I am already writing a file to a folder, but if a previous version of that same file exists it simply overwrites the old one.
How do you determine if a file already exists in a certain folder? For example: If I want to write a file called Test1.txt to a certain directory, how do I check if that file already exsits there before actully writing the new file to that directory? If the file does exist I would like to keep that file there and add this new one but add a (1) behind the file.
Thanks a lot