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

Changing file name and replacing the file with the same name in OneDrive

I need to be able to change file name from an email attachment.

The attachment is coming in like this: CHull APs due 30 days-06052020-18.xlsx. 

I need to save attachment as: CHull APs due 30 days.xlsx (delete everything pass the -) for every email attachment.

In the OneDrive Business folder, a file with the same name already exists. So, I need the new one to override the existing one.

 

I can't seem to find a good example to assist me with this situation.

 

Please help.

Thanks,

Eva Garcia

1 ACCEPTED SOLUTION

Accepted Solutions
Krishna92
Microsoft
Microsoft

@EvaAGarcia 

 

this might be a bit lengthy process but will help you with resolution.

 

Consider we have a string  CHull APs due 30 days-06052020-18.xlsx and we want the resultant string to be  CHull APs due 30 days-06052020-18.xlsx

 

To achieve this you can make use of split function.

 

when you do Split(string,separator('-')) it will split the string based on the separator value which is '-' and will make it into three parts

 

Chull APs due 30 days 06052020 18 now this is in format of array where in we can use indexes to refer the value that we like.

 

Now if we add a compose action to the flow and how outputs(split function executed previously)[0] this will show the text Chull APs due 30 days.

 

You can do the same to extract the file extension, and do a contact to join both the values.

 

If this information helps you with resolution, please consider giving a thumbs up and mark the solution as resolved.

View solution in original post

1 REPLY 1
Krishna92
Microsoft
Microsoft

@EvaAGarcia 

 

this might be a bit lengthy process but will help you with resolution.

 

Consider we have a string  CHull APs due 30 days-06052020-18.xlsx and we want the resultant string to be  CHull APs due 30 days-06052020-18.xlsx

 

To achieve this you can make use of split function.

 

when you do Split(string,separator('-')) it will split the string based on the separator value which is '-' and will make it into three parts

 

Chull APs due 30 days 06052020 18 now this is in format of array where in we can use indexes to refer the value that we like.

 

Now if we add a compose action to the flow and how outputs(split function executed previously)[0] this will show the text Chull APs due 30 days.

 

You can do the same to extract the file extension, and do a contact to join both the values.

 

If this information helps you with resolution, please consider giving a thumbs up and mark the solution as resolved.

View solution in original post

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!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Users online (2,376)