How to copy a file from one machine to another machine

N

Nico Grubert

Hi there,

I would like to copy a file from one machine (machine #01) to another
(machine #02).

machine #01: Suse Linux 9.2, Samba 3, Python 2.3.5
machine #02: Windows Machine, Destination Dir: <Share>\temp\files\

Both machines are in one network so they can communicate each other. In
order to be able to write a file in the directory on Machine #02 I need
to be the user "myadmin".

In a short Python program I create the source file on Machine #01 like this:

filecontent = 'This is just a test...'
# my own helper method to generate a unique filename
filename = createUniqueFilename()
f = open('/var/files/' + filename, 'w')
f.write(filecontent)
f.close()


Every time a new source file has been created it needs to be copied or
moved from machine #01 to machine #02.
Are there Python modules which help me doing this job? Any examples how
to do that would be very helpful.

Kind regards and many thanks in advance,
Nico
 
M

Markus Rosenstihl

Hi
I think scp is also a solution. I am sure there exist free sshserveres
for windows. THat would make the stuff a bit more secure, and the login
can be automated via public-key.

Regards
Markus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top