This is the Batch File i have created however i always keep some files on my desktop that i would like to backup using this bathc file.
I have inserted a line to backup the desktop but it doesnt copy any files or folders???
Im stumped can anyone help me out???
@Echo off
:: variables
set drive=J:\Media Centre Backup
set folder=%date:~7,2%
set backupcmd=xcopy /s /c /d /t /e /h /i /r /y /h
echo ### Backing up My Documents...
%backupcmd% "%USERPROFILE%\My Documents" "%drive%\My Documents"
echo ### Backing up Desktop...
%backupcmd% "%USERPROFILE%\Desktop" "%drive%\Desktop"
echo ### Backing up the Registry...
if not exist "%drive%\Registry" mkdir "%drive%\Registry"
if exist "%drive%\Registry\regbackup.reg" del "%drive%\Registry\regbackup.reg"
regedit /e "%drive%\Registry\regbackup.reg"
:: use below syntax to backup other directories...
:: %backupcmd% "...source directory..." "%drive%\...destination dir..."
echo Backup Complete!
@pause
I have inserted a line to backup the desktop but it doesnt copy any files or folders???
Im stumped can anyone help me out???
@Echo off
:: variables
set drive=J:\Media Centre Backup
set folder=%date:~7,2%
set backupcmd=xcopy /s /c /d /t /e /h /i /r /y /h
echo ### Backing up My Documents...
%backupcmd% "%USERPROFILE%\My Documents" "%drive%\My Documents"
echo ### Backing up Desktop...
%backupcmd% "%USERPROFILE%\Desktop" "%drive%\Desktop"
echo ### Backing up the Registry...
if not exist "%drive%\Registry" mkdir "%drive%\Registry"
if exist "%drive%\Registry\regbackup.reg" del "%drive%\Registry\regbackup.reg"
regedit /e "%drive%\Registry\regbackup.reg"
:: use below syntax to backup other directories...
:: %backupcmd% "...source directory..." "%drive%\...destination dir..."
echo Backup Complete!
@pause