Guest User

Untitled

a guest
Nov 2nd, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. path = 'C://path/to/my/files'
  2. cnopts = pysftp.CnOpts()
  3. cnopts.hostkeys = None
  4. with pysftp.Connection('111.222.333.444', username='username', password='password', cnopts=cnopts) as sftp:
  5.  
  6. sftp.put(path + 'file1.txt' , preserve_mtime=True)
  7. time.sleep(5)
  8. sftp.put(path + 'file2.txt' , preserve_mtime=True)
  9. time.sleep(5)
  10. sftp.put(path + 'file3.txt' , preserve_mtime=True)
  11. time.sleep(5)
  12.  
  13. sftp.close()
Add Comment
Please, Sign In to add comment