Navigation:  Actions > Files >

Delete Files Action

Previous pageReturn to chapter overviewNext page

The Delete Files action creates a step to delete files and folders.  It supports processing of subdirectories, including and excluding files and folders via file masks, configurable logging of operations, a debug mode to only display the files that would be deleted, and more.


Note: Be very careful when using this action, as many files can be quickly deleted.  It is advisable to use the Do not delete option when testing to show which files would be deleted.


When the step completes, the following temporary macros are created or updated:

DELETEFILES_COUNT = The number of files that were deleted


Folder: The directory to delete files from (required).


Note: You can also specify a path and filename or path and file mask in this field (instead of using the Include field).


Files to delete: Used to specify files or folders to specifically include or exclude when deleting (optional).


Ensure file is writeable before deleting: Determines if read-only files will be deleted.


Search subdirectories: Determines if subdirectories will be searched recursively for deleting.


Delete empty folders: If checked, empty subdirectories as a result of deleting files will also be deleted.


Don't delete root folder: If checked, the root folder will not be deleted even if all files and folders in it are deleted.


Continue processing remaining files: If checked, and a matching file can't be deleted, processing of the remaining files will continue (the step will still report failure on completion).


Do not delete: If checked, no files will be deleted, but any enabled logging will be displayed and a count of files that would have been deleted will be logged.  Useful for debugging purposes.


Log files that are deleted: If checked, any files that are deleted will be logged.


Attributes Tab


Note: See the Recurse sample for an example of the Delete Files action.