how to rename/move file on sftp

[code] dim e as integer
dim d as new CURLSMBS

d.OptionVerbose = true
d.OptionDirListOnly = true
d.CollectOutputData = true
d.CollectDebugData = true
d.OptionUsername = "
d.OptionPassword = "

dim ws() As String
ws.Append"RNFR file move"
ws.Append"RNTO destination path"



dim s as string = d.DebugData+EndOfLine+d.OutputData
s = ReplaceLineEndings(s, EndOfLine)
dim lines() as string = split(s, EndOfLine)
for each line as string in lines
listbox1.AddRow line

listbox1.addrow "Result: "+str(e)
I am using sftp server and I want to move file .
when above code is executed ,connected to sftp but it showing Result:21 and uknown sftp command error

RNFR is for FTP. But you use SFTP.
So you need to use other command like “mv”. Same as with terminal.

Thank you for Reply, I got sftp Command for rename/move.
Use below updated code

  dim ws() As String
  ws.Append"rename ***old path***   ***new path****"

Need space between old and new path