ImageEn, unit iexFolderMView

TImageEnFolderMView.RenameFile

TImageEnFolderMView.RenameFile


Declaration


function RenameFile(idx : Integer; const sNewName : string) : boolean;


Description


Renames the file at idx to sNewName using the standard windows functionality.

Result is true unless an error was encountered.

If you specify IEF_CURRENT_FILE for idx then currently selected file will be renamed.

Notes:
- sNewName must be a name only, without a folder path
- Has no effect for files on a device folder
- Users can rename files using F2 or double-clicking a filename by disabling ReadOnly


Example


// Rename current file to "Selected.jpg"
RenameFile(IEF_CURRENT_FILE, 'Selected.jpg');