cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
breater
Frequent Visitor

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
Super User
Super User

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
Super User
Super User

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
Frequent Visitor

Thank you @DeepakS ,

 

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

hi @breater 

 

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

 

Regards,

breater
Frequent Visitor

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,264)