How do you move a file after generating it to another folder without having name collision problem?
for example, i generate a CSV file name foo_20090820.csv and if i run the program again later on 08/20/2009 then the file will be foo_20090820.csv since on my target folder there already an file generated before the second file. The program will run into an error.
I tried looking into the target folder for the same file name and add some random number in front the second file but it didn't work quite well.
any idea?