Uploading a file with ftplib

Rene Pijlman reply.in.the.newsgroup at my.address.is.invalid
Thu Jan 1 09:14:18 EST 2004


Michael_Goettsche: 
>can anybody please tell me how to upload it properly?

This is a snippet from one of my scripts, that works fine:

    ftp = ftplib.FTP(Hostname,Username,Password)
    ftp.cwd(WorkingDirectory)
    ftp.storbinary("STOR " + RemoteZipFile, file(LocalZipFile, "rb"))
    ftp.quit()

-- 
René Pijlman



More information about the Python-list mailing list