Discuss this help topic in SecureBlackbox Forum


TElSftpClient     See also     

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

Renames a file or folder on a server side.


    bool RenameFile(string OldPath, string NewPath);

    Function RenameFile(ByVal OldPath As String, ByVal NewPath As String) As Boolean

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

    bool RenameFile(const std::string &OldPath, const std::string &NewPath);

    bool RenameFile(string $OldPath, string $NewPath)


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

Return value

    True if operation was completed successfully;
    False otherwise.


    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