Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from ftplib import FTP
- import sys, getpass, os.path
- def main():
- host = 'adres'
- username = 'uzytkownik'
- localfile="plik.exe"
- password = 'password'
- ftp = FTP(host)
- ftp.login(username, password)
- ftp.cwd(remotedir)
- with open(localfile, 'rb') as f:
- fpt.storbinary(' STOR %s' os.path.basename(localfile), f)
- ftp.quit()
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement