Contact Us 1-800-596-4880

Delete File

Delete File will delete a file located at the specified path. The action step can be used, for example, to delete files which were generated within a Workflow. If the file for deletion does not exist, the action step does not terminate the Workflow with an error. There is however an option that enables the generation of an error message in the event of a non-existent file.

Properties

File Operation Settings

  • Directory path Enter the path to the directory from which the file is to be deleted. You can specify an absolute or relative path. If a relative path is used, then the path relates to the Base Path variable.

  • File Name The name of the file to delete.

    This field does not support placeholders. For further information, see Path / file name / invalid characters.

  • Force error if file does not exist If this option has been enabled, an error message will interrupt the Workflow if the file for deletion does not exist. If this option is not enabled and the file does not exist, the Workflow will continue and no error message will be generated.

Other Properties that are the same in all action steps are described in the section on Common Properties. For reasons of clarity they are not shown here.

Inbound Variables

  • Directory path Enter the path to the directory from which the file is to be deleted. You can specify an absolute or relative path. If a relative path is used, then the path relates to the Base Path variable.

  • File Name Enter the name of the file that is to be deleted.

Outbound Variables

IsDeleted The Delete File.IsDeleted variable indicates whether the file could be deleted or not (True/False).

File Name The Delete File.File Name variable provides the name of the file that is to be deleted.

Directory path The Delete File.Directory Path variable provides the path that is used.

Wizard

  • Directory path Specify the path to the file that is to be deleted. You can create an absolute path or a path relative to the Base Path. The initial value is %STWS_BASEPATH%. Select an existing path. You can also insert variables from the Workflow in order to construct the path. To do so, click on the pin and select one of the available variables.

  • File name Enter the name of the file that is to be deleted. You can also insert a variable from the Workflow as the File Name. To do so, click on the pin and select one of the available variables.

  • Force error if file does not exist If this option has been enabled, an error message will interrupt the Workflow if the file for deletion does not exist. If this option is not enabled and the file does not exist, the Workflow will continue and no error message will be generated.