Hello All,
I want to copy zipped file from one machine to another in same network. I have the IP and folder of destiny machine, but I'm pondering on the best way to go!

transfering among same drive, I will use shutil module. But what about networked PCs? Should I use FTP module or there is something better. Your suggestion colleagues are invaluable. If you don't mind you can give cons and pros of each suggestion.

Thanks alot!

no you nedd socket programming:)


use google:)

can sockets be used to send as big as 10MB?
Is there limitations with sockets?
What are other possible solutions?

other i dont know .


no limitations:)

I'd suggest secure copy via ssh (scp).

jl,669


and can you giuve me link about that?

scp is integrated with ssh so if you can find an openssh server for your platform, you should be in the clear. PS: It's not really recommended to use python for this as there are many steps required to complete this step via scp.

If you just need to transfer files over IP then yes, socket programming is your only option (PS: Everything from IP, TCP, UDP, etc all the way down to ETH All uses sockets as their interface. SCP and FTP both use sockets too).

The best way to implement this would be to create a stream socket (TCP) on a client-to-client base and do the following to manage the streaming:

1. Send the complete checksum (just use md5.hexdigest for this) followed by the length of the file
2. Start streaming the file one chunk at a time
3. On the server side, after then length of the stream == to the length sent by the number, do checksum comparison and close the socket.

Thanks guys,
I'm still pondering and reading stuffs on suggestion. But one question to this "create a stream socket (TCP) on a client-to-client base" How do you do that? I know about sockets on client-server only. I will contact google though

no:D

Well, I'm not answering your question. I found this introduction, that probably will help you understand a bit more about sockets, and after that you may try this one, well this one is a bit more complex.

Best from Dan08.

On my home network, I transfer files using the pyro module.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.