Greetings,
I am running W7 Home Premium on a Dell Laptop. I have used the following bat file to back up my computer for years, however, when I tried to run it today (as a user and administrator) I got the errors below.
@Echo Off
Echo.
If exist E:\ (Echo. External USB HD ready for BackUp) else (Echo. No External USB HD detected & Goto :EOF)
Echo.
pause
Echo.
Set ToDay=%Date:~-4,4%-%Date:~-10,2%-%Date:~-7,2%
XCopy "C:\Users\%UserName%\Documents" E:\Ray_BackUp_%ToDay%\"My Documents" /I /E /S /V
XCopy "C:\Users\%UserName%\Favorites" E:\Ray_BackUp_%ToDay%\Favorites /I /E /S /V
XCopy "C:\Users\%UserName%\Desktop\*.bat" E:\Ray_BackUp_%ToDay%\Desktop /I /E /S /V
XCopy "C:\Users\%UserName%\AppData\Local\Microsoft\Windows Mail" E:\Ray_BackUp_%ToDay%\"Windows Mail" /I /E /S /V
XCopy "C:\Xnews_test 2006.06.28\*.*" E:\Ray_BackUp_%ToDay%\xNEWS /I /E /S /V
Set ToDay=
::END_OF_BATCH
Echo.
Echo.
Echo. All Done
pause
I apologize that the long lines wrapped. There are no spaces between the wrapped lines.
Here are the errors:
Invalid Switch - /\"My Documents"
Invalid Switch - /\Favorites
Invalid Switch - /\Desktop
Invalid Switch - /\"Windows Mail"
Invalid Switch - /\xNews
Any idea how to get this file to run?
Thanks for your help!
I am running W7 Home Premium on a Dell Laptop. I have used the following bat file to back up my computer for years, however, when I tried to run it today (as a user and administrator) I got the errors below.
@Echo Off
Echo.
If exist E:\ (Echo. External USB HD ready for BackUp) else (Echo. No External USB HD detected & Goto :EOF)
Echo.
pause
Echo.
Set ToDay=%Date:~-4,4%-%Date:~-10,2%-%Date:~-7,2%
XCopy "C:\Users\%UserName%\Documents" E:\Ray_BackUp_%ToDay%\"My Documents" /I /E /S /V
XCopy "C:\Users\%UserName%\Favorites" E:\Ray_BackUp_%ToDay%\Favorites /I /E /S /V
XCopy "C:\Users\%UserName%\Desktop\*.bat" E:\Ray_BackUp_%ToDay%\Desktop /I /E /S /V
XCopy "C:\Users\%UserName%\AppData\Local\Microsoft\Windows Mail" E:\Ray_BackUp_%ToDay%\"Windows Mail" /I /E /S /V
XCopy "C:\Xnews_test 2006.06.28\*.*" E:\Ray_BackUp_%ToDay%\xNEWS /I /E /S /V
Set ToDay=
::END_OF_BATCH
Echo.
Echo.
Echo. All Done
pause
I apologize that the long lines wrapped. There are no spaces between the wrapped lines.
Here are the errors:
Invalid Switch - /\"My Documents"
Invalid Switch - /\Favorites
Invalid Switch - /\Desktop
Invalid Switch - /\"Windows Mail"
Invalid Switch - /\xNews
Any idea how to get this file to run?
Thanks for your help!