Discuss this help topic in SecureBlackbox Forum

TElSftpClient.RenameFile

TElSftpClient     See also     


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


Renames a file or folder on a server side.

Declaration

[C#/Java]
    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)

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