In windows explorer, right clicking, dragging a file and dropping in the same pane, the option to copy here is given.
When taken, a new file is created "Copy (x) of ..."
How to do the almost the same in command line appending (x) to the end of the file name where x is an ascending number depending on the number of existing copies.
We can call that CopyHere.bat
Copy Here
Moderator: DosItHelp
Re: Copy Here
There is no built-in mechanism in any of the batch commands to append or increment an appendix for existing file names. You have to write your own code to do that by counting all files that already exist with this file name. Or try in a loop which appendix already exists.
viewtopic.php?f=3&t=6204
Steffen
viewtopic.php?f=3&t=6204
Steffen