Back to product page
- Introduction
- License agreement
- Classes
- Enumerations
- Exceptions
- WeOnlyDo.Client.FtpDLX
- Properties
- Authentication
- Blocking
- BufferSize
- Certificate
- Compression
- DirFormat
- DirItems
- Encryption
- Hostname
- KeepAlive
- LastError
- ListItem
- ListParams
- LocalPath
- Login
- MaxTransferRate
- Passive
- Password
- Port
- PreserveDates
- PrivateKey
- Protocol
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- PublicKeyOpenSSH
- PublicKeySSH
- RemotePath
- Resume
- SecureMethod
- SmartGet
- SmartPut
- State
- StrictHost
- Tag
- Timeout
- Timezone
- TransferMode
- TransferRate
- TransferTime
- UseIPv6
- Version
- Methods
- Events
- Properties
- WeOnlyDo.Client.DirItemsCollection
- WeOnlyDo.Client.DirItem
- 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 | Full path to new file/directory name. |
public Void Rename(String NewRemotePath, String OldRemotePath);
The Rename(NewRemotePath,OldRemotePath) syntax has these parts:
NewRemotePath | Full path to new file/directory name. |
OldRemotePath | Full path to old file/directory name. |
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 | Full path to new file/directory name. |
public Sub Rename(ByVal NewRemotePath As String, ByVal OldRemotePath As String)
The Rename(NewRemotePath,OldRemotePath) syntax has these parts:
NewRemotePath | Full path to new file/directory name. |
OldRemotePath | Full path to old file/directory name. |
Remarks
This method will rename file or directory in remote server, if possible. Once completed, Done event will be fired. If no error occurs, Args.Error argument in Done event will be set to null (Nothing in VB). If error occurred, Args.Error will contain info about the error.If you don't specify OldRemotePath argument, then wodFtpDLX.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 FTP and SFTP protocols.
No wildcards can be used for RemotePath argument. RFC protocol specifications for FTP and FTP do not allow them.