cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
breater
Level: Powered On

Change OneDrive File name every month

Hey everyone,

 

I created a workflow which sends every week an Excel-File with the hours of work of every employee who uses this flow.

 

But the personnel department wants, that the Excel-File change every month the name e.g. "weekly_hours_01" (01 for January, 02 for February etc.).

 

I tried the "Move or rename a file using path"-Function and renaming works, but when the file is renamed one time, the file-path is wrong, because the file-name changed and it doesnt update it automatically.

 

1.JPG

 

Is there any possibility to automate the renaming every month?

1 ACCEPTED SOLUTION

Accepted Solutions
DeepakS
Level 10

Re: Change OneDrive File name every month

Hi @breater 

 

I would add action List files in folder than dynamically get the file and rename it.

Here is an example:

RenameFile.png 

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
DeepakS
Level 10

Re: Change OneDrive File name every month

Hi @breater 

 

I would add action List files in folder than dynamically get the file and rename it.

Here is an example:

RenameFile.png 

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

breater
Level: Powered On

Re: Change OneDrive File name every month

Thank you @DeepakS ,

 

I'll try. But what exactly do you have in your "Compose-Function"?

DeepakS
Level 10

Re: Change OneDrive File name every month

hi @breater 

 

You can ignore compose i just added that to generate a random number to test 🙂

 

Regards,

breater
Level: Powered On

Re: Change OneDrive File name every month

Hey @DeepakS ,

 

this functions works well but i have a problem:

When I run this second time and the name of the file didn't change, the flow delete the file and then throws an error (when I have activated the overwrite function in "Move or Rename a File"). Otherwise it throws an error too.

 

But I need to run this every week, so there are 3-4 times a month, where the flow shouldn't change the file-name.

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,990)