We help IT Professionals succeed at work.

xcopy command

hi all
i am trying to sync 2 folders over a vpn using the xcopy command
i am using the following command in a bat file and  scheduled task

xcopy /S /Y /F c:\scanrouter \\server\backup of scans\backup

when the task runs the cmd window opens and then closes but the files dont sync

im running the task on a windows 2000  and the destination is on an sbs server 2003

what am i doing worng

thanks
robbie

Comment
Watch Question

Commented:
Xcopy can't use UNC names. Map the network location to a drive and try it again.
LBizzleMicrosoft Enterprise Administrator & AWS cloud Consultant
Commented:
I would try no spaces in your directory path use _ like backup_of_scans\backup

I would take out the F since you are not wathing it anyway..

cd C:\
xcopy c:\downloads$\CitrixDNEupdate.msi \\xyus\data\is\temp

This worked perfectly even using DFS; I would start without the extra arguments and then work on it from there... If you could post your bat file that would be good. Also, you may need to make sure the account the batch file is running under has permissions to write to the new destination..
xcopy /S /Y /F c:\scanrouter \\server\backup of scans\backup

Try this xcopy /S /Y /F c:\scanrouter "\\server\backup of scans\backup"

Author

Commented:
thanks lads
i maped a drive and used no spaces and tested
it seems to be running ok now
i owe ye 1

thanks a million

Author

Commented:
sory wpannell1: the two lads just got it be4 u
LBizzleMicrosoft Enterprise Administrator & AWS cloud Consultant

Commented:
Just to clairfy... I used DFS path (UNC) and it works just fine. Spaces were the issue.