1

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

Tobia
  • 1,210
  • 8
  • 37
  • 73
  • 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 08:41

1 Answers1

0

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 .

Alex H
  • 1,814
  • 11
  • 18