Command Reference

Delete Files

Deletes files from the local system.

Action ID: 8
Action Category: File Operations

Settings

Location

Source

The path and file name of the files to delete (this can include the wildcards "*" and "?").

Options

Recurse subdirectories

If checked, the delete command will recurse through subdirectories when a wildcard is used in the Source field.

Continue deleting files even if one or more fail

If checked, the delete operation will continue even if some files fail to be deleted. If unchecked, the delete operation will stop as soon as the first error occurs.

Delete hidden and system files

If checked, files with the "hidden" or "system" attributes set will be deleted. If unchecked, hidden and system files will not be deleted.

Return Values

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

Could not delete file(s).

Invalid source specified.
<<Source>>

2

Could not delete file(s).

One or more files could not be deleted.
<<Comma separated list of files that could not be deleted>>

Examples

Example 1

In this example, we will delete a file called "mycontrol.dll" from the user's system directory.

Source: %SysDir%\mycontrol.dll

Example 2

In this example, we will delete all files and subfolders of the "backup" subfolder in the main program directory.

Source: %SrcDir%\backup\*.*
Recurse subdirectories: Checked

 

See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab