Copying files to multiple comp's on a lan
Henrik Berg Nielsen
hbn at imada.sdu.dk
Sat Jun 2 23:38:12 CEST 2001
Hi again all,
Thx for all the replys, it was really more than I expected!
I've been reading over all your suggestions and I can see that I should have
provided a bit more information about the machines involved. So here goes:
All machines, including the host which should distribute the files, run
Win2k. I have write access to all machines, and all machines have a share
called "temp" on the C drive. Likewise all machines have the same login and
I've been fiddling a bit around with the various suggestions you guys made
and I can't really seem to get it to work my way. I'd prefer the Python
approach (as it seems doable and I have absolutely 0 experience on shell
programming). So far I haven't been able to access file on the remote
machines via the open() method. What should I write if I wanted to access
the file called "foo.txt" located in the "temp" folder on the C drive of the
machine named "Orion"?
I like the approach more where I let os.system() do the copying for me, but
it really doesn't work all that good if I can't assemble the proper network
paths. On a side note; what does os.sytem() do specifically?
I thank you all alot for all the fine responses, but could you next time
please be a bit more specific as I'm a rather newbie to all this stuff... :)
Also I tried "import win32api, win32file, win32net" and it can't find
neither of them, should I install these seperately or what? (plz don't laugh
Henrik Berg Nielsen
"Henrik Berg Nielsen" <hbn at imada.sdu.dk> wrote in message
news:9f8k3v$1i04$1 at news.cybercity.dk...
> Hi all,
> I'm rather new to Python, and this is my first post in this NG (as you can
> probably tell). I hope that you guys can get the meaning of my writings as
> english is not my native language, so I apology beforehand for any
> spelling/grammatical errors.
> I need to make a small script thats capable of copying a file from the
> machine that its being run on to all the other machines on the lan. The
> target path on all the other machines should be the same. The script
> take the path of the source file and the remote path to the shared
> as arguments. I'll define all the machines the file is to be copied to
> Where do I start when making such a script? What kind of builtins should I
> know of and which functions will be useful in my work? What do I need to
> investigate closer (I've never tried network programming before)?
> I used to do this filecopying for each machine seperately with the Windows
> Explorer, and seeing as its something that I do rather often, I'm
> to get a little bugged by this tedious method, and have decided that now
> time to make it a little more automated.
> If you know of an already existing program that can accomplish this task
> me any pointers would be greatly appreciated.
> Thanks in advance,
> Henrik Berg Nielsen
More information about the Python-list