Skip to main content

Rename file

Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

Change the name of a file. This command allows you to rename an existing file while keeping it in the same location. You can specify how to handle situations where a file with the new name already exists.


Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

File to rename

Select the file to rename, enter the file path, or select a variable containing file path.

Any valid file path

Yes

New file name

Enter the new name for the file. If no extension is provided, the original extension will be kept

Any valid file name

Yes

If the file exists

When a file with the same name already exists in the folder, you can choose to not rename or overwrite.

Do not perform renaming; Overwrite original file

No

Default: Do not perform renaming

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app.

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process.

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption.

Variables produced

Store updated file path into: This variable will contain the full path of the renamed file after the action is completed.


Using Variables in Conditions

You can use variables in the parameters of this command by clicking the {x} button or selecting from previously defined variables. This is particularly useful when you need to dynamically determine file paths or names based on previous actions in your workflow.


Notes

  • The file must exist at the specified location for the rename operation to succeed.

  • If you don't provide a file extension in the new name, the original file's extension will be preserved.

  • The command will fail if you attempt to rename a file that is currently in use by another process.

  • Make sure you have appropriate permissions to modify files in the target location.

Did this answer your question?