Windows Back up through batch file and dos commands
Hey folks - I'm currently making the switch back to windows. needed for school.
But anyway what I'm trying to do is create weekly backups through a batch file - this is my current batch file
robocopy C:\!Data\books\ /mir f:\\backup\books
robocopy C:\!Data\school\ /mir f:\\backup\school
robocopy C:\!Data\Programming\ /mir f:\\backup\Programming\
robocopy C:\!Data\usefull\ /mir f:\\backup\usefull\
robocopy C:\inetpub\ /mir f:\\backup\inetpub\
robocopy C:\!Data\pictures\ /mir f:\\backup\pictures\
robocopy C:\!Data\notes\ /mir f:\\backup\notes\
robocopy C:\AddisonWesley\ /mir f:\\backup\AddisonWesley\
is there a simple way to add that every monday it creates a new directory, so instead of it being
robocopy c:\\*dir location* /mir F:\\backup\*dir location*
it would be
robocopy c:\\*dir location* /mir F:\\*date*\*dir location*
if its not that easy is there a way to use a varible like
%var% = 11112011
robocopy c:\\*dir location* /mir f:\\%var%\*dir location*
I'm not to familiar with dos. or if there is an ability to do a system date check then pipe it into the file directory you are creating.
Thanks for any input - you get what I'm trying to do. if anyone has any suggestions let me know
November 27th, 2011 8:48pm