4

So I know about ftplib, but that's a bit too low for me as it still requires me to handle uploading files one at a time as well as determining if there are subdirectories, creating the equivalent subdirectories on the server, cd'ing into those subdirectories and then finally uploading the correct files into those subdirectories. It's an annoying task that I'd rather avoid if I can, what with writing tests, setting up test ftp servers etc etc..

Any of you know of a library (or mb some code scrawled on the bathroom wall..) that takes care of this for me or should I just accept my fate and roll my own?

Thanks

3
  • people still use ftp??? why???
    – nosklo
    Jun 16, 2009 at 22:57
  • 2
    @nosklo: Eh, why not? What superior alternative is there? Jan 4, 2012 at 9:11
  • 1
    @Protectorone what's not superior to ftp? I mean, scp, sftp, bittorrent, http, cifs, webdav, rsync...
    – nosklo
    Jan 10, 2012 at 1:40

2 Answers 2

11

The ftputil Python library is a high-level interface to the ftplib module.

Looks like this could help. ftputil website

1
  • Excellent.. there's a script there called ftp_sync that isn't part of the standard ftputil install, but it does exactly what I was looking for. Thanks!
    – Silfheed
    Jun 16, 2009 at 22:47
3

If wget is installed on your system, you could have your script call it to do the ftp'ing for you. It supports recursive transfers, site mirroring, and many other features.

1
  • I know about wget, but I have more of a problem uploading whole directories to remote servers than retrieving directories. I just googled wput, but it's not installed on the server.
    – Silfheed
    Jun 16, 2009 at 23:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.