delete

Deletes the named file. Any action script with the delete command will terminate if the file exists but cannot be deleted. This can happen due to write protection or an attempt to delete from a CD-ROM, for instance. If the file does not exist at all, however, the action script will continue to execute.

Syntax

delete <FileName>

Where FileName is the name of the file to delete (typically enclosed in quotes). Relevance substitution is performed on the arguments of delete action command lines.

Examples

delete "c:\program files\bigsoftware\module.dll"
delete "{name of drive of windows folder}\win.com"

These examples delete the specified files. Note that you can use variable substitution (in curly brackets) to specify pathnames.

Note

It's good practice to enclose filenames in quotes to preserve spaces in the filenames. Without quotes, the file system will not be able to access those files with spaces in the path or file name.

Version 5.1 and above