Xcopy Batch file, report back success or failure of hostnames on LAN
Posted on 2010-08-20
I am trying to automate a process by using the XCOPY command to multiple computers. I can get the xcopy to work, but I would like to have the command report back the hostnames in which the copy was successful on, and the same for failures?
It only seems to report back my local computer name which I am running the script from.
I am running this script locally on a LAN and don’t have access to GP.
Any help is greatly appreciated!
So far this is what I have:
REM *** Copy’s AO folder with file content needed to do administrative functions***
FOR /f %%x in (computertest.txt) DO XCOPY “c:\AO\*" "\\%%x\c$\AO\" /y
Echo hostname > \\66BQ1k1\c$\Logs\%computername%