New
#1
XCOPY in batch file to create new folder
Hello
I’ve been using the “xcopy” command in a batch file to backup a folder & all contents inside. I use task schedule to back up the folder files each day and then it backups what has changed from the previous backup.
Example:
XCOPY "E:\Stuff" "J:\Stuff" /s /f /y /c /d /I
Now I need to backup these files each day to a new folder so I can retain the data in the previous folder.
For example if I wanted to backup
XCOPY "E:\Stuff" "J:\Stuff" /s /f /y /c /d
and I wanted to retain the data located in J:\Stuff folder during the next backup.
How would I configure the batch file to create a new folder the next time the backup starts.
For example J:\Stuff_1 and the next day create folder J:\Stuff_2 and so forth
Thanks for helping