Is it possible to copy the same file without overwriting it with XCOPY?

I am using Windows 7 and I am using the XCOPY command in a batch file to copy files. I want to make additional copies of the same file instead of overwriting them.


For example I would like to have XCOPY make duplicate files when I run it but make a copy of the new file(s) when I run it each time.

For example if I have a file called recipe.txt, I would like to run XCOPY and have a file like

recipe.txt

recipe.txt (1)

recipe.txt (2)

recipe.txt (3)

and so on everytime I run XCOPY


I used this code in a batch file


xcopy "C:\Users\MYCMP1\Desktop\recipe.txt" "H:\copiedfiles" /d
pause

but it gives me the overwrite prompt of yes/no/all and i am trying to avoid this.

If xcopy cannot do this, is there any type of software that can make duplicates such as the one i mentioned above (recipe.txt (1), recipe.txt (2), etc)


Any help would be appreciated.

Continue reading...
 
Top Bottom