ShellBrowser Delphi Components Documentation
|
Renames a file or folder.
class procedure Rename(const pFileName: string; const pNewname: string; pOptions: TOperationOptions = soDefault); overload; static;
Parameters |
Description |
const pFileName: string |
The file or folder that should be renamed. |
const pNewname: string |
The new name of the specified file or folder. |
pOptions: TOperationOptions = soDefault |
Optional: The options to use. |
To avoid name conflicts use TOperationOption.soRenameCollision in Options.
Exceptions |
Description |
EArgumentException |
if any parameter is empty. |
The following example shows how to rename a file:
TJamFileOperation.Rename('C:file.exe', 'New name.exe');