1.

Solve : batch file for xcopy?

Answer»

Hi,

recently, i've been TRYING to perform data backup between the office and home via VPN. So i use the xcopy. I have been using it many times by going to ms-dos and type in the full path as follows:

X:\xcopy General\* \\fileserver\mydoc\General /s/e/y/m

and it WORKS. That's great. But then because i want to use a batch file so that i can get it to perform backup activity automatically. so i went to add a SCHEDULE on windows and set the time and date and all that sort of things. However, when the task was running,in the ms-dos WINDOW, it said file not found * followed by 0 copied files. I don't know what's going on.

The following is what i have in my copybackup.BAT

cls
@echo off

xcopy X:\General\* \\fileserver\mydoc\General /s/e/y/m

if errorlevel 4 goto lowmemory
if errorlevel 2 goto abort
if errorlevel 0 goto exit

:lowmemory
echo.Insufficient memory to copy files or
echo.invalid drive or command-line syntax.
goto exit

:abort
echo.You pressed CTRL+C to end the copy operation
goto exit

:exit

echo.Copying Job Completed.

Could anyone point out what went wrong?

Thank you in advance and look forward to hearing from youTry PUTTING it in quotes.



Discussion

No Comment Found