Download file from FTP server : FTP « Network « Python






Download file from FTP server

 

import ftplib
ftp = ftblib.FTP("ftp.yourServer.com")
ftp.login("username", "password")
filename = "index.html"
ftp.storlines("STOR " + filename, open(filename))
filename="app.exe"
ftp.storbinary("STOR " + filename, open(filename, "rb"), 1024)

   
  








Related examples in the same category

1.An FTP-to-FTP Transfer Program
2.Debug Output from an FTP Transfer
3.Using an Object Instance as an FTP Callback