Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have some trouble with xcopy or maybe with windows/drivers/etc/hosts DNS file. If I add my xcopy command in a windows scheduled task, xcopy can not resolve server's name stored in hosts file, infact, if I change the command with ip address instead of names everything works.. can you tell me why?

This is the hosts file:

10.1.1.200  diskstation
10.1.1.201  rackstation

This is the not working command:

xcopy \\diskstation\bck\VHD \\rackstation\backup\vhd /e /y /I

This is the working command:

xcopy \\10.1.1.200\bck\VHD \\rackstation\backup\vhd /e /y /I

NB: the first command works if i run it from console, my trouble is only when it is call by scheduled task. NB2: a "ping diskstation" test is successful

share|improve this question
    
Please post the (not-working) xcopy command AND the line from the hosts file specifying that host. One of them must have a syntax error. –  Tonny Oct 19 '12 at 8:41

1 Answer 1

You might want to run the xcopy from a .bat file and run the bat file from Task Schedueler but as Tonny said above , copy/paste the command and let us know how do you run it .

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.