Rename File

This article provides information on the following topics:

Note: The Actions Quick Reference provides a complete list of actions that you can print for easy reference.

What is the Rename File Action?

The Rename File Action renames one or more files.

Creating a Rename File Action

Select Files & Folders Actions to expand the Action list. Select the Rename File Action from the Actions list to display the Action Builder.

Both the Timing  and Error settings for this action may be configured to fine tune the how the Action will run.

Note: For more information about the timing and error settings, go to Action Builder.

Enter the Name of the file(s) to rename. Be sure to enter the full file path.

Note: When entering the file path , an asterisk (wildcard character) can be used to select multiple files.  The following example selects all the .txt file in the directory:  "C:\MyFolder\*.txt"

Enter a New name for the file to be renamed.  Do not include the file path, only the file name. For example, rather than entering "C:\MyFolder\NewFileName.txt", you would enter the file name only: "NewFileName.txt"

Note: When renaming multiple files simultaneously, the New name you provide will be used to rename all files.  to prevent a file name conflict, Nintex RPA LE automatically increments the file name.  For example, if the new desired file name is "NewFileName.txt" and 3 files were selected to be renamed, the files would be given the following names:  "NewFileName_1.txt", "NewFileName_2.txt", "NewFileName_3.txt".

 

Check the Include subfolders option if you would also like to rename files in subfolders.  

If the new file name matches the name of an existing file in the directory, the Action will fail unless you check the Overwrite option .  This will instruct Nintex RPA LE to replace the existing files with the file that is being renamed.

If a file is being renamed to a file name that already exists, and you do not wish to overwrite an existing file, you can check the Avoid conflicts option , and the next unused file name will be used instead.  For example, if a file name "MyFile.txt" is being renamed to "NewFile.txt" and a file with the name "NewFile.txt" already exists, the file name "NewFile_1.txt" will be used instead.

The Options section allows you to further refine which files are considered.  Enabling any of the these options will only include files with specific attributes.  You have the ability to filter files by:

  • Create date
  • Equal to
  • Newer than
  • Newer than or equal to
  • Older than
  • Older than or equal to
  • Last modified date
  • Equal to
  • Newer than
  • Newer than or equal to
  • Older than
  • Older than or equal to
  • File size
  • Equal to
  • Larger than
  • Larger than or equal to
  • Smaller than
  • Smaller than or equal to

Additionally, you have the ability to filter by the Read-Only, Archive, Hidden, System, and Compressed attributes of the file.

Optionally add Notes to the Action to document any special instructions or functionality. When the Run Switchis set to Run, the action will be executed after clicking OK.

Note: The run switch is set to Run by default. To create or modify this action without executing it, click the slider to change the option to Don't Run.  For more information, go to Action Builder.

Click the OK button to save the Action.