Creating a batch file
Create a batch file for backup processing.
Name the batch file as 'D:\bat\backup01.bat.'
- <Contents of backup01.bat>
-
@echo off echo.| date > %TEMP%\$$$.TMP for /f "eol=N tokens=2-4 delims=./ " %%i in (%TEMP%\$$$.TMP) do set FILE=%%i%%j%%k set bkup1=E:\Documents set bkup2=D:\bkup\%FILE% md %bkup2% del %TEMP%\$$$.TMP xcopy %bkup1% %bkup2% /E
NoteThis batch file is an example for explanation purposes, and it does not contain any error-handling codes.