XenoGuard 4.0 Documentation

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.


[-] Hide
  1. Open the Windows node in the Workspace Explorer.
  2. 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]

Warning

Executing the Delete ActionStep permanently erases a file from the directory and cannot be recovered.

Warning

An error can occur in any of these scenarios if the specified Path Name:

  • is a directory.
  • is a read-only file.
  • is an executable file that is currently in use.

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.

See other File operations: