Is there a way to copy a file in an other directory like a copy/paste.
.MoveTo() method move only the SftpFile and I tried WriteAllBytes() method using SftpFile.Attribues.GetBytes(), but it writes always a corrupted file.
Thank you
Is there a way to copy a file in an other directory like a copy/paste.
.MoveTo() method move only the SftpFile and I tried WriteAllBytes() method using SftpFile.Attribues.GetBytes(), but it writes always a corrupted file.
Thank you
Copyright © 2021 Jogjafile Inc.
You will hardly be able to copy the file directly. For details why, see:
In an SFTP session is it possible to copy one remote file to another location on same remote SFTP server?
So you have to download and re-upload the file.
The easiest way to do that (without creating a temporary local file) is: