Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- path = 'C://path/to/my/files'
- cnopts = pysftp.CnOpts()
- cnopts.hostkeys = None
- with pysftp.Connection('111.222.333.444', username='username', password='password', cnopts=cnopts) as sftp:
- sftp.put(path + 'file1.txt' , preserve_mtime=True)
- time.sleep(5)
- sftp.put(path + 'file2.txt' , preserve_mtime=True)
- time.sleep(5)
- sftp.put(path + 'file3.txt' , preserve_mtime=True)
- time.sleep(5)
- sftp.close()
Add Comment
Please, Sign In to add comment