cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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.

View solution in original post

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.

View solution in original post

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

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,795)