I am using Pysftp to transfer files from a Windows server to a Buffalo Terastation. I would like to be able to tell it to transfer all files in a folder using the PUT_R command but when I run my code the files are transferred oddly.
My code:
srv.put_r('c:/temp1/photos', 'array1/test_sftp/photos', preserve_mtime=True)
When I run the code I get filenames on the Terastation that look like
photos\.\image1.jpg
photos\.\image2.jpg
I guess the code is not dealing with paths between platforms correctly. How can I correct the paths?
I have tried
dest = dest.replace('\\.\\','/')
But I get a "No Such File" error