I need to create a batch file that copies a file and increments it upon placing it at the destination. Example.
copy C:TEMPMyDoc.txt E:MyData
Essentially, I need this copy command to copy every time I start it (which it does now just fine). I would like it to increment the file name instead of overwrite it though. If I ran this three times or 100 times (never a certain number) I would like to see on the "MyData" folder:
MyDoc.txt
MyDoc(1).txt
...
Or Copy (1) I'm not really sure what the syntax is for a duplicated file nor do I necessarily care. I just want to ensure that I'm not overwriting the pre-existing file on my jump drive.
The catch is I'm doing this on an Allen Bradley PanelView Plus that is old and running Windows CE. Any help would be greatly appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…