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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,251)