Using Delete action for file

Use the Delete action to delete a file. This action enables you to delete a file based on its size and the date it was created or modified.

Procedure

Follow these steps to delete a file:

  1. In the Actions palette, double-click or drag the Delete action from the File package.
  2. From the Source file field select one of the following options:
    • Specific path: Specify the name and location of the file.
    • For Regex: Specify the source folder path.

      You can use a regular expression (regex) in your source file or folder path to support a pattern-based search. Select the regular expression either as a String or Pattern for each regular expression condition and enter the value.

      For example, if want to copy, delete, rename or print multiple files from your source folder using pattern based search, use regular expressions either as a String and enter the value as My_ for all file name starting with My_ or as a Pattern such as [a-z]{3}(.txt|xlxs) to retrieve files that matches this pattern.

    Note:
    • If the file does not exist in the file path, an error message is displayed.
    • When you use this action to delete a file, it is deleted permanently and not moved to the recycle bin.
  3. Select the Delete multiple files simultaneously for improved performance check box to delete large number of files simultaneously thus improving the speed of delete operation.
  4. Select the Size check box to delete a file based on its size.
    1. Select any of the following options from the list:
      • Atleast: Deletes a file only if the file size is more than the size you have specified.
      • Atmost: Deletes a file only if the file size is less than the size you have specified.
      • Exact: Deletes a file only if the file size is the same as the size you have specified.
    2. Specify a value in the Size field.
  5. Select the Date check box to delete a file based on the date it was created or modified.
    1. Select one of the options from the list:
      • Created: Enables you to delete a file based on the date it was created.
      • Modified: Enables you to delete a file based on the date it was modified.
    2. Use the second drop-down menu to select one of the following additional options:
      • Relative to runtime: select this option and specify a value in the field. This option enables you to perform the operation on the file if it was created or modified within the number of days you have specified. For example, if you specify 7 in the field, the system performs the operation on the file if it was created or modified in the last 7 days.
      • Between two dates: To specify the time period.

        This option enables you to specify a Start date and an End date of the period. For example, if you specify 01/01/19 and 01/31/19 as the start date and end date, the system performs the operation on the file if it was created or modified between these dates.

        Note: The Start date and End date are included in the period.
      • On a date: To specify a particular date.

        This option enables you to set a specific date that a file was created or modified.

      • Before a date: To specify a date prior to which the files were created.

        For example, if you set the date as 07/28/20, files created or modified before this date are selected

        Optional: Select the Including date check box if you want include the date you have specified for the Before a date option.

  6. Click Save.