ImageEn, unit iexFolderMView

TImageEnFolderMView.DeleteSelectedFilesFromFolder

TImageEnFolderMView.DeleteSelectedFilesFromFolder


Declaration

function DeleteSelectedFilesFromFolder : Boolean;


Description

Deletes the selected files from the current folder. Do not confuse this method with DeleteSelectedImages the files are deleted from the system.

Result is False if the action failed or was aborted.

If ieioSendToRecycleBin is specified for FileOperationOptions the files are moved to the Recycle Bin (though this will depend on the user's settings in Windows). Otherwise they are permanently deleted.


Example

// Send selected file to Recycle Bin
IEFolderMView1.FileOperationOptions := FileOperationOptions + [ieioSendToRecycleBin];
IEFolderMView1.DeleteSelectedFilesFromFolder();

// Permanently delete the selected file with confirmation
IEFolderMView1.FileOperationOptions := FileOperationOptions - [ieioSendToRecycleBin] + [ieioShowConfirmation];
IEFolderMView1.DeleteSelectedFilesFromFolder();