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

Input is a list of files in one drive for business and then change the name of each file to "user created " and Date while maintaining the extension

I have a one drive with a bench of files uploaded from submitted forms. Now that i have the files, i would like to change the name of each file to the user name uploaded the file (which is the created by) and add a date. 2 questions, how do i do this once and how do i automate this every time a a new form is submitted. 

 

You help is much appreciated.  

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @Boater71 ,

 

Please try the following configuration:

147.PNG

replace(body('Get_file_metadata')?['Path'],body('Get_file_metadata')?['DisplayName'],'')
utcNow('yyyy-MM-dd')
last(split(body('Get_file_metadata')?['Name'],'.'))

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
ChristianAbata
Super User II
Super User II

hi @Boater71  you can use the same questions like this

what.PNG



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
v-bacao-msft
Community Support
Community Support

 

Hi @Boater71 ,

 

It seems the files uploaded to MS Forms have been added to the responder’s name.

You only need to add the date to the file name, please try to refer to the following method to achieve your requirement.

Please check the following video to get the file uploaded to Forms and change the file name.

https://www.youtube.com/watch?v=Foy8i6jPZrg

89.PNG

Expression reference:

replace(body('Get_file_metadata')?['Path'],body('Get_file_metadata')?['DisplayName'],'')
utcNow('yyyy-MM-dd')

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for your help here as this helped a lot. However, what I'm struggling with is how to change the entire file name and maintain the same extension. I can't seem to figure this part out. 

 

You help is much appreciated. 

 

 

Hi @Boater71 ,

 

Please try the following configuration:

147.PNG

replace(body('Get_file_metadata')?['Path'],body('Get_file_metadata')?['DisplayName'],'')
utcNow('yyyy-MM-dd')
last(split(body('Get_file_metadata')?['Name'],'.'))

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

it worked - THANK YOU. 

 

QQ, how do I change the folder path in the expression? 

 

Hi @Boater71 ,

 

You could type the folder path in Destination File Path field directly to change the folder path.

164.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,151)