Xcopy batch file that creates new folder
Posted: 03 Mar 2022 23:12
Hello
I’ve been using the “xcopy” command in a batch file to backup the contents in a folder. I use task schedule to back up these files each day and backup what has changed from the previous backup.
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
C:\data to D:\data and I wanted to retain the data located in d:\data 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 c:\data to d:\data_1
Thanks for helping
I’ve been using the “xcopy” command in a batch file to backup the contents in a folder. I use task schedule to back up these files each day and backup what has changed from the previous backup.
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
C:\data to D:\data and I wanted to retain the data located in d:\data 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 c:\data to d:\data_1
Thanks for helping