-2

I am trying to execute a python script to move a file from a source to destination folder by adding timestamp using shutil and OS modules . I can execute the script fine when i use source and path files within same server. Seems like shutil function doesn't work to move/copy files when source/dest paths are from a SFTP server.

My requirement is to perform file movement on a SFTP server by executing script on a remote server. Can this be achieved using Paramiko ?

  • first try to use `Paramiko` - and come back when you get error message. – furas Jul 08 '21 at 12:37
  • 1
    where is your code? Where is Full error message which you get when you run it? We can't read in your mind - you have to show all information in question (not in comment) as text (not image) – furas Jul 08 '21 at 12:38

1 Answers1

-1

All,

I was able to fix the issue. sftp_client.rename(src,dest) worked fine. I was using os.rename() earlier.