Back to product page
- Introduction
- License agreement
- Classes
- Enumerations
- Exceptions
- WeOnlyDo.Client.SFTP
- Methods
- Properties
- Authentication
- Blocking
- BufferSize
- Compression
- Encryption
- EncryptionList
- HMacList
- Hostname
- KeepAlives
- KeyExchangeList
- LastError
- ListItem
- LocalPath
- Login
- MaxTransferRate
- Password
- Port
- PrivateKey
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- RemoteIdentification
- RemotePath
- Resume
- State
- Timeout
- TransferMode
- TransferRate
- TransferTime
- Version
- Events
- How to get support?
Rename method
Renames file or directory on the server.
Type
VoidSyntax
- C#
- VB.NET
public Void Rename(String NewRemotePath);
The Rename(NewRemotePath) syntax has these parts:
public Void Rename(String NewRemotePath, String OldRemotePath);
The Rename(NewRemotePath,OldRemotePath) syntax has these parts:
The Rename(NewRemotePath) syntax has these parts:
NewRemotePath | New name for the file or directory. |
public Void Rename(String NewRemotePath, String OldRemotePath);
The Rename(NewRemotePath,OldRemotePath) syntax has these parts:
NewRemotePath | New name for the file or directory. |
OldRemotePath | Old name of the file or directory. |
public Sub Rename(ByVal NewRemotePath As String)
The Rename(NewRemotePath) syntax has these parts:
public Sub Rename(ByVal NewRemotePath As String, ByVal OldRemotePath As String)
The Rename(NewRemotePath,OldRemotePath) syntax has these parts:
The Rename(NewRemotePath) syntax has these parts:
NewRemotePath | New name for the file or directory. |
public Sub Rename(ByVal NewRemotePath As String, ByVal OldRemotePath As String)
The Rename(NewRemotePath,OldRemotePath) syntax has these parts:
NewRemotePath | New name for the file or directory. |
OldRemotePath | Old name of the file or directory. |
Remarks
This method will rename file or directory in remote server, if possible. Once completed, Done event will be fired. If no error occurs, Error argument in Done event will be set to null. If error occurred, Error will contain description for the error.If you don't specify OldRemotePath argument, then wodSFTP.NET will use value of RemotePath property for this method.
Even UNIX (and windows in last few versions) have same command for renaming and moving (which is in fact MOVE command), you cannot be sure that this command will also move files from one directory to another. This depends only on server-side implementation of SFTP protocol.
No wildcards can be used for RemotePath argument. RFC protocol specification for SFTP does not allow them.