activities
latest
false
UiPath logo, featuring letters U and I in white
Productivity Activities
Last updated Nov 6, 2024

Include creation date in new OneDrive file names

Summary: When a file is created in OneDrive, rename it to include the creation date in the file name.

Applications: OneDrive

Description: This example explains how to create a workflow that automatically renames files created in OneDrive to include in the name the file's creation date. This example presents Microsoft 365 activities such as File Created and Move File/Folder.

Workflow

  1. Open Studio Web and create a new project.
  2. For How to start the automation select Event based, then select the Microsoft 365 File Created trigger activity.
  3. In the trigger activity:
    1. Set up your Microsoft OneDrive & SharePoint connection.
    2. Set the In Location field. For example, select one of your OneDrive folders and set additional filters, if needed.


  4. Add a Log Message activity and configure the message as follows: File created to rename: CreatedFile.FullName.
    This step is optional.


  5. Next, add a Move File/Folder activity and configure it:
    1. In the File or folder to move field, click the Plus button menu to choose Use variable, then select the output variable of the trigger activity.
    2. In the New name field, add all the properties you wish to include in the file name. Select the output variable of the trigger activity and drill down to its properties, one by one: CreatedFile.Name - CreatedFile.CreationDate.Value.Year, CreatedFile.CreationDate.Value.Month, CreatedFile..CreationDate.Value.Day, CreatedFile.CreationDate.Value.Hour, CreatedFile.CreationDate.Value.Minute, CreatedFile.CreationDate.Value.Second, CreatedFile.Extension


  6. You're done and ready to run your project!
  • Workflow

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.