web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Identify and rename a ...
Power Automate
Unanswered

Identify and rename a OneDrive file

(0) ShareShare
ReportReport
Posted on by 2

I am trying to create a flow that will identify a file in my OneDrive Downloads folder based on 2 conditions, and then rename it with today's date and move it to another folder. 

 

This should be possible with the Compose and "Move or rename a file (OneDrive for Business)" connections but I am getting errors when it tries to execute the move/rename action. 

 

I've pasted here what it says when I try to test the flow:

Error
Action 'Move_or_rename_a_file' failed
Error Details
The file id 'Daily Transaction Summary Report-2023-10 (1).xlsx' is not valid.
 
Here is the raw input of the action that fails:

 

{
 "host": {
 "connectionReferenceName": "shared_onedriveforbusiness",
 "operationId": "MoveFile"
 },
 "parameters": {
 "id": "Daily Transaction Summary Report-2023-10 (1).xlsx",
 "destination": "C:\\Users\\xxx\\xxx\\xxx\\My DTS\\",
 "overwrite": true
 }
}

Perhaps I'm not fully understanding HOW to rename a file with that action? Should I be putting the new file name in the File field, or the old one so that it is identified?

I've even tried to split it up and perform the action twice: once to move, and once to rename. Could it be because the Excel file I am trying to rename doesn't have editing enabled when I open the file? That shouldn't prevent me from renaming it in File Explorer though.

 

Not sure, just looking for some direction here!

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,490 Most Valuable Professional on at

    If you are creating the path to the file in a Compose and then using that as a file identifier you need to enclose that in an EncodeUriComponent() function to translate spaces and special characters. I know what you are using looks like the string in a run, but you need to encode it if you are using a variable instead of the file picker.

  • AshlynH Profile Picture
    2 on at

    So - update! I've been able to successfully rename the file (using the id parameter rather than name), but I am having trouble moving it from my Downloads to "C:\xx\xx\OneDrive\Desktop\My DTS". When I enter that as the File Destination Path, it just renames the whole file to the path chosen. How can I get that file from my downloads to a specified folder?

     

    Edit: the flow also only seems to run when I am testing it, it doesn't run on its own. Sorry if these are very simple solutions, I am brand new to using Power Automate.

  • Pstork1 Profile Picture
    69,490 Most Valuable Professional on at

    "C:\xx\xx\OneDrive\Desktop\My DTS" isn't a folder in OneDrive. Its a folder on your desktop that is synced with a folder in OneDrive.  Make sure you are using the URL address of the file in OneDrive on the web.

     

    For it only running during testing, what trigger are you using?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 464

#2
Haque Profile Picture

Haque 431

#3
David_MA Profile Picture

David_MA 323 Super User 2026 Season 1

Last 30 days Overall leaderboard