Link to home
Start Free TrialLog in
Avatar of AndreIfill
AndreIfillFlag for Barbados

asked on

How do I copy files from one location to several machines using psexec and a textfile?

How do I copy files from one location to several machines using psexec and a textfile?
Avatar of AmazingTech
AmazingTech

Why bother using PSEXEC to copy?

Command line:
FOR /f %a in (machines.txt) do XCOPY /s /y \\server\share\folder \\%a\c$\folder\*.*

Batch file
FOR /f %%a in (machines.txt) do XCOPY /s /y \\server\share\folder \\%%a\c$\folder\*.*

Avatar of AndreIfill

ASKER

Can you tell me what the %a is used for?
ASKER CERTIFIED SOLUTION
Avatar of AmazingTech
AmazingTech

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial