Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:  diskstation  rackstation

This is the not working command:

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

This is the working command:

xcopy \\\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

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


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.