Discuss this help topic in SecureBlackbox Forum

TElSftpClient.RenameFile

TElSftpClient     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Renames a file or folder on a server side.

Declaration

[C#]
    bool RenameFile(string OldPath, string NewPath);

[VB.NET]
    Function RenameFile(ByVal OldPath As String, ByVal NewPath As String) As Boolean

[Pascal]
    function RenameFile(OldPath : string; NewPath : string): Boolean;
    procedure RenameFileSync(const OldPath, NewPath: string);

[C++]
    bool RenameFile(const std::string &OldPath, const std::string &NewPath);

[PHP]
    bool RenameFile(string $OldPath, string $NewPath)

[Java]
    boolean renameFile(String OldPath, String NewPath);

Parameters

  • OldPath - path to existing file
  • NewPath - specifies the new name/location of the file

Return value

    True if operation was completed successfully;
    False otherwise.

Description

    Use this method to rename the file specified by OldPath to the NewPath. If the file was successfully renamed, the OnSuccess event is fired. The OnError event is fired otherwise.

See also:     CreateFile     RemoveFile    

Discuss this help topic in SecureBlackbox Forum