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$.
Python

Avatar of undefined
Last Comment
mish33

8/22/2022 - Mon
mish33


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

Open in new window

ASKER CERTIFIED SOLUTION
mish33

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck