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

Create Folder in SP with part of uploaded Filename

Hi everyone,

 

is there a way for me to create a new Folder with just a part of the Filename.

I have a document library where you can upload files for approval. The Filename template looks like this:

 

Date_Process_Name.pdf

 

After the file got approved i want to create a Folder und move the file in this Folder.

The Folder Name should only consist of the "name" part.

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Create Folder in SP with part of uploaded Filename

Hi @crevan ,

 

You could arrive your purpose though add a Compose Action to split the file name:

split("Filenamewithextension",'.')[0]

 

you can have a reference on the split function:

functions-reference#split

 

Then Add Create file action, in the Folder path append on the output of file name without extension. Then you can create a Delete action to delete the original file.

1.PNG

Best regards,

Mabel  

 

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

Re: Create Folder in SP with part of uploaded Filename

Hi @crevan ,

 

You could arrive your purpose though add a Compose Action to split the file name:

split("Filenamewithextension",'.')[0]

 

you can have a reference on the split function:

functions-reference#split

 

Then Add Create file action, in the Folder path append on the output of file name without extension. Then you can create a Delete action to delete the original file.

1.PNG

Best regards,

Mabel  

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
crevan
Level: Powered On

Re: Create Folder in SP with part of uploaded Filename

Thank you @v-yamao-msft 

it worked

 

split(split(triggerOutputs()['headers']['x-ms-file-id'],'_')[2],'.')[0]

was the solution for me

Helpful resources

Announcements
firstImage

Microsoft Flow Online Conference

Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 38 members 4,049 guests
Please welcome our newest community members: