Skip to content

Instantly share code, notes, and snippets.

@kimyongyeon
Forked from niceaji/ftp_upload.py
Created June 9, 2016 04:23
Show Gist options
  • Save kimyongyeon/44ec5374ecd5d9bca2189fc4fb284bc3 to your computer and use it in GitHub Desktop.
Save kimyongyeon/44ec5374ecd5d9bca2189fc4fb284bc3 to your computer and use it in GitHub Desktop.
python-ftp파일업로드
#!/usr/bin/env python
import ftplib
ftp = ftplib.FTP('host','user','password')
fname = "업로드할 파일명(path포함가능"
full_fname = "로컬파일명(path포함가능)"
ftp.storlines('STOR '+ fname, open(full_fname, 'rb'))
ftp.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment