I got tired of copy/pasting my folder files every morning. Though it is just Ctrl+C then Ctrl+V then rename the folder, it has been a redundant and boring task.
To make things a little faster, I created a batch file for my everyday back-up routine. Well actually, i just combined scripts i got from google.
@REM Seamonkey’s quick date batch (MMDDYYYY format)
@REM Setups %date variable
@REM First parses month, day, and year into mm , dd, yyyy formats and then combines to be MMDDYYYY
FOR /F “TOKENS=1* DELIMS= ” %%A IN (‘DATE/T’) DO SET CDATE=%%B
FOR /F “TOKENS=1,2 eol=/ DELIMS=/ ” %%A IN (‘DATE/T’) DO SET mm=%%B
FOR /F “TOKENS=1,2 DELIMS=/ eol=/” %%A IN (‘echo %CDATE%’) DO SET dd=%%B
FOR /F “TOKENS=2,3 DELIMS=/ ” %%A IN (‘echo %CDATE%’) DO SET yyyy=%%B
mkdir “D:/backup/webfolder %date%”
xcopy “C:/webfolder” “D:/backup/webfolder %date%” /E
So everyday it would create a folder
D:/backup/webfolder monthtoday-daytoday-yeartoday (D:/backup/webfolder 12-16-2008)
Then copy the files and subdirectory from
to the new backup folder directory
And because my work is starts at 7am, i created a scheduled task every 7:30am everyday to run my batch file.
Another step crossed out from my daily work routine.