Example of using Rename action

In this example, you will build a bot to rename an existing file in a specified location. Use Regex expression to locate the specific file and rename it.

Prerequisites

Before you start building the bot, create the following files and name them:
  • Automation360.txt
  • Automation360_Old.txt
  • Automation360-New.txt
  • Datatable_new.csv

Procedure

  1. Create a bot.
    1. On the left panel, click Automation.

      A list of available bots and forms is displayed.

    2. Click Create a bot.
    3. Enter the bot name: File_Rename.
    4. Click Create and Edit.
  2. Rename the Automation360-New.txt file.
    1. From the File > Regex option, in the Folder path field, enter C:\Temp\
    2. In the File name field, select Type as Pattern.
    3. In the Value field, enter ([A-Za-z0-9]*)-\w+(.txt|.csv) to search for the file.
    4. In the New file name field, enter Automation360-latest.txt
    5. Select the Date option.
    6. From the Date option, select Created > On a date.
    7. In the Date field, enter 11/03/2023.
      Note: Enter the date on which you created the file.
  3. Click Save and then Run.

    The bot renames the Automation360-New.txt file to Automation360-latest.txt.