Archived Forum Post

Index of archived forum posts

Question:

Do Sftp has Copy File Property ??

Sep 11 '14 at 16:11

http://www.example-code.com/vbnet/sftp_changeDirectory.asp - On reading this link. I can understand that File folder will work different for sftp. But i have to Copy or Cut the file from Root directory to the given folder path.

Do sftp support Copy File. I do know that they have sftp.RemoveFile property This works perfect.

success = sftp.RemoveFile(_fileName)
        If (success <> True) Then
            MsgBox(sftp.LastErrorText)
            Exit Function
        End If

I need a MoveFile Property which can copy the file from the Root Directory and Paste in the given folder file path.


Answer

Maybe use OpenFile(), ReadFile...() and one of the WriteFile...() functions to "copy" it? Otherwise download and upload to another Folder.

Just an idea...