Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ftplib
- server = '127.0.0.1'
- username = 'localhost'
- password = 'hello123'
- ftp_connection = ftplib.FTP(server, username, password)
- remote_path = "C:UserssaiDesktopImageS"
- ftp_connection.cwd(remote_path)
- fh = open("/home/pi/Desktop/ImageS/test.txt", 'rb')
- ftp_connection.storbinary('STOR test.txt', fh)
- fh.close()
Add Comment
Please, Sign In to add comment