Link to home
Start Free TrialLog in
Avatar of yokai
yokai

asked on

Copy Folder & Contents to Multiple Machines on Network

Good morning,

I would like to copy a folder & all contents of it (FOLDER) from a host machine (HOST) to multiple computers on a network.  If I have, say, 6 computers (COMPUTER1, COMPUTER2, etc), how can I copy FOLDER to the C: drive on these machines?  I am able to access the C drive of each machine via UNC \\COMPUTER1\C$.
Avatar of mish33
mish33
Flag of United States of America image


import shutil
 
for comp in ('COMPUTER1', 'COMPUTER2', 'etc'):
  shutil.copytree(r'C:\FOLDER', r'\\COMPUTER1\C$\FOLDER')

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of mish33
mish33
Flag of United States of America image

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