Delete File(s)



The Delete files action deletes one or more files.


Note that this action does not provide an option to recurse through directories. For this you need the Delete Directory Action.






Specify the file(s) to delete. You can use wildcards (? or *) in the file name.



Delete Read Only Files - Normally read only files will not be deleted. Check this option to remove them.


Delete Hidden Files - Similar to Delete Read Only files.


Fail If Zero Files Affected - If this option is checked and no files are found, the action will fail.



Scripting Info


The Action properties available are :


property  FileSpec  :WideString; // the file specification for the files to delete. You may use Wildcards.

property  FilesAffected : integer ; // read only, the number of files deleted

property FailIfNoFile : WordBool; // fail if no files affected.

property  DeleteReadOnly : WordBool; // delete read only files.

property  DeleteHidden : WordBool; //delete hidden files.

property  LogFilesDeleted : Boolean; //logs each file that gets deleted