Rename Command: rename
The Rename command renames a specified file within an automation workflow. It helps organize files, standardize naming conventions, and improve file management without altering the file’s content or location.
Example: Suppose you want to rename a file named Draft.docx in the C:\Documents folder to FinalReport.docx.
Steps to configure:
- Select Set a Variable Value from the Action dropdown.
- Enter a variable name in Element Key (e.g., RenameStatus). This variable will store the result of the rename operation (True or False).
- Click on Form, select Functions, and choose File handler Functions.
- In the Cmd field, select Rename and provide:
- File: Specify the path of the file you want to rename (e.g., C:\Documents\Draft.docx).
- FileAfterRename: Enter the new name of the file (e.g., FinalReport.docx).


Outcome on execution:
- Success: The file is renamed successfully, and the command returns true in the specified variable.
- Failure: If the file cannot be renamed (e.g., it doesn’t exist or is in use), the command returns false.
- This variable can be used in later steps of your automation process to reference the stored information using the syntax ${VariableName} (e.g., ${RenameStatus}).