ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
Jam.Shell.Dialogs.FileOperation.TJamFileOperation.Delete

Deletes files or folders.

Syntax
Pascal
class procedure Delete(const pFileNames: IItemIdListCollection; pOptions: TOperationOptions = soDefault); overload; static;
Parameters 
Description 
const pFileNames: IItemIdListCollection 
The files or folders that should be deleted.  
pOptions: TOperationOptions = soDefault 
Optional: The options to use.  
Exceptions 
Description 
if pFileNames contains no valid ItemIdList.  

The following example shows how to delete multiple files:

  var
    Files: IItemIdListCollection;
  begin
    Files := TItemIdListCollection.Create;
    Files.Add('C:file1.exe');
    Files.Add('C:file2.exe');
    TJamFileOperation.Delete(Files);
  end;