Skip to main content

Rename File

AutomatR.DefaultActivities.FileAndFolder.RenameFile

The "Rename File" activity in AutomatR allows you to rename a file using Microsoft APIs within your OneDrive account. This activity falls under the File category and provides a convenient way to rename files, enhancing file management capabilities in your automation workflows.

Properties

NameDescription
Input
File PathSpecifies the full path of the file on your local drive, including the filename that needs to be renamed. String variables containing the file path.
New File NameSpecifies the new name that you want to assign to the file after renaming. String variables containing the new file name.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. Enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Rename File" activity. Useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the wait time is 1000 milliseconds or 1 sec, i.e., 1.

How to use:

  1. Drag and drop the "Rename File" activity onto the workflow.
  2. Configure the properties by specifying the file path and the new file name.
  3. Optionally, configure the delay.
  4. Execute the workflow to rename the specified file in your OneDrive account.

Example: Consider an example where the "Rename File" activity is used to rename a file named "workbook.csv" to "updated_workbook.csv" in the "C:\files\" directory:

Rename File:
File Path: "C:\files\workbook.csv"
New File Name: "updated_workbook.csv"

In this example, the activity renames the "workbook.csv" file to "updated_workbook.csv" in the specified path. Adjust the file path and new file name based on your requirements.