Delete
ActionStep Reference » Windows » File » Delete
The ActionStep File Delete permanently removes a file from a specified directory. The declared Path Name is not case-sensitive, thus a file named as "File 1.txt" or "file 1.txt" will be deleted.
- Open the Windows node in the Workspace Explorer.
- Open the File node, select the Delete ActionStep.
Parameters:
The ActionStep has the following input parameters:
name |
Description
|
---|---|
Path Name
|
The path name of the file to be deleted from a directory.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Results:
The ActionStep returns the following results:
name
|
description
|
---|---|
Target Path Name
|
Displays the path name of the deleted file.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter] |
Executing the Delete ActionStep permanently erases a file from the directory and cannot be recovered. |
An error can occur in any of these scenarios if the specified Path Name:
|
Example 1 (Remove all text files from a directory):
This example retrieves all text files from the old workspace directory. The For Each ActionStep then iterates each text file from the list and deletes the files permanently. The Result is then output in Message Box.