Solved Creating updated but separate versions of folder with batch.

March 5, 2012 at 23:56:33
Specs: Windows 8 DEV, /3gb
I've already created a batch file with the purpose of backing up a folder that changes over time. I tried using the following code in the hopes that, instead of over-writing, it'd create another copy of the folder with a different name. (Ex. Folder, Folder(1), Folder(2), etc.)

@ echo off
title Confirm Server Backup
echo You are about to attempt a world backup.
title Dumping files...
color cf
xcopy "O:\Users\Koaten\Desktop\Beta_Server\Server\Factions of Nature" "O:\Users\Koaten\Desktop\Beta_Server\BackupTemp\BackupFolder" /e
title Creating backup
color e0
echo Now transferring to backup folder...
xcopy "O:\Users\Koaten\Desktop\Beta_Server\BackupTemp" "O:\Users\Koaten\Desktop\Beta_Server\Backup" /e
title Done!
color a0
echo Backup successful!

How would I have it create a new and renamed version of "BackupFolder" each time I run this script? Also, if possible, would there be a way to have this script run automatically each day?

Any input would be appreciated.

Edit: I forgot to mention that anything within "Beta_Server" cannot be modified. That's why I had it dump the files into another folder first, instead of just putting "Factions_of_Nature" inside an empty shell-folder.

See More: Creating updated but separate versions of folder with batch.

Report •

March 6, 2012 at 09:08:28
✔ Best Answer
Can you just add a date? backupfolder%date%. just for convience?

otherwise you may want to consider If exist.


Report •

March 6, 2012 at 15:59:49
Thanks! That'll work since I'll only need to update once a day, anyways.

Report •

March 7, 2012 at 06:51:36
Sure, If you need to do it another way, or have problems setting up the date let me know. :-)


Report •
Related Solutions

Ask Question