Using Rename action for file

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

Procedure

To rename a file, follow these steps:

  1. In the Actions palette, double-click or drag the Rename action from the File package.
  2. From the Source file field select one of the following options:
    • Specific: 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.

  3. In the New file name field, specify a new name for the file.
  4. Select the Size check box to rename a file based on its size.
    1. Select one of the options from the list:
      • Atleast: Renames a file only if the file size is more than the size you have specified.
      • Atmost: Renames a file only if the file size is less than the size you have specified.
      • Exact: Renames 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 rename a file based on the date it was created or modified.
    1. Select any of the following options from the list:
      • Created: Enables you to rename a file based on the date it was created.
      • Modified: Enables you to rename a file based on the date it was modified.
    2. Select the Is within last 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.
    3. Select the Is between option to specify a period.
      This option enables you to specify a Start date and an End date for the period. For example, if you specify 01/01/19 as the start date and 01/31/19 as the end date of the period, the system performs the operation on the file if it was created or modified between this period.
      Note: The Start date and End date are included in the period.
    4. Select the Is before 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 on or before the date you have specified.
    5. Select the On a date option and specify a date in the field.
      This option enables you to perform the operation on a file if it was created or modified on the date that you specified.
  6. Click Save.