Delete File
What does Delete File do?
The Delete File directive deletes an existing file if it exists.
If the file does not exist, the step will simply display an error message but will not exit the execution of the remainder of the Prog script.
How do I use the Delete File directive?
To delete a file, enter the absolute directory path of the file you want to delete.
Proggy also accepts the use of wildcard. For example, if you want to delete all filenames that start with the letters abc
, you can use abc*
as the source file.
Similarly, if you want to delete all files with a certain filename extension (eg. txt
files), you can use *.txt
.
Behaviour of the Delete File directive
- If the target file(s) does not exist, the directive will be skipped.
- If some files could not be deleted, the Prog command will let you know which deletions were unsuccessful. However, the Prog command execution will continue to run.
- It should be noted that this directive will not delete folders. To delete folders, you must use the Delete Folder directive.
Example use cases for the Delete File directive
- Performing routine file and folder manipulation