Skip to content

Delete#

Screenshot showing a button labeled "Delete".

When activated the delete task tries to delete a given file or directory (the file/ directory path can be provided by input or defined on the task settings).

Screenshot showing a delete option with a path displayed below.

Inputs#

Name Description
path String Path of the file / directory
attempts Integer Number of attempts to perform this operation. Default is 1 attempt
sleepBetweenAttempts Integer Interval of time between the attempts. Default is 1000ms
Activate any Activate the task

Outputs#

Name Data Type Description
Success Boolean Triggered when the task is executed with success
Error Error Triggered when the task failed for some reason

Settings#

On the General tab, you have the usual settings and the following settings:

Name Data Type Values Default Description
File/Directory path String Path of the file / directory
Number of attempts Integer 1 Number of attempts to perform this operation.
Sleep Between Attempts Integer 1000 Interval of time between the attempts.

For the File/Directory path you can use tokens as represented below:

Available tokens:
  ${path} - Watched path
  ${archive} - Archive path
  ${temp} - Temporary directory of the user
  ${id} - DriverId ("\" chars replaced with "_")

Examples:
  ${path}\subdir\file.txt
  ${temp}\files\${id}\file.txt
  c:\dsource\file.txt

Screenshot showing settings menu.

Behavior#

In this task you choose a driver when dropping it into the workflow (if you have more than one driver associated with the controller).

Upon activation, will send a Delete command to the driver where it will try to delete the path location (file or directory). If it fails, will retry attempts times, waiting sleepBetweenAttemptsmilliseconds each time.

If the operation is executed with success, a value true is emitted on the Success output. In case of the task , for some reason, is not able perform the copy operation, an Error is emitted.

Remarks#

The task returns a Success even if the file or directory to delete does not exist (a value true is emitted at the first attempt)