You can create separate files for each run by simply adding a timestamp to the file name. Something like that:
XCOPY "File.txt" "[TargetDir]\File1_%time:~0,2%_%time:~3,2%_%time:~6,2%.txt"
This resolves the file name, which reads as File1_11_30_05.txt , given that the copy operation occurs at 11:30:05. The %time:~0,2% extracts 2 digits from the time string stored in the %time% variable.
In addition, you can also add a date in the same way. You can use the %date% variable for this purpose.
If you really need a template, for example File-COPY1.txt , File-COPY2.txt , etc. It takes a bit more work. Let us know if the timestamp approach is not enough.
source share