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

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
Community Support

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
Community Support

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

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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (73,106)