ftp recursively

Jeff Schwab jeff at schwabcenter.com
Wed Mar 19 05:03:16 CET 2008


Gabriel Genellina wrote:
> En Tue, 18 Mar 2008 18:25:28 -0300, Jeff Schwab <jeff at schwabcenter.com> 
> escribió:
> 
>> I need to move a directory tree (~9GB) from one machine to another on
>> the same LAN.  What's the best (briefest and most portable) way to do
>> this in Python?
> 
> See Tools/scripts/ftpmirror.py in your Python installation.

Thank you, that's perfect.  Thanks to Arnaud as well, for the pointer to 
ftplib, which might useful for other purposes as well.

Per the earlier advice of other posters (including one whose message 
seems mysteriously to have disappeared from c.l.python), I just stuck 
with the Unix tools I already knew: I ended up tarring the whole 9GB, 
ftping it as a flat file, and untarring it on the other side.  Of 
course, the motivation wasn't just to get the files from point A to 
point B using Unix (which I already know how to do), but to take 
advantage of an opportunity to learn some Python; next time, I'll try 
the ftpmirror.py script if it's generic enough, or ftplib if there are 
more specific requirements.



More information about the Python-list mailing list