cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
j3-crre
Level: Powered On

Path from File Path

I am building a flow where I want the output path to be the same as the input but I believe it is failing because the only variable I have is the "File Path" dynamic content variable which is the full path to the file as well as the file name.

 

Basically I am trying to figure out if there is an Azure/Flow equivalent to dirname() so that a full file path like:

 

  • /my/path/myfile.tmp

 

becomes

 

  • /my/path

 

Is there a function like dirname() that will remove the end of the path back to the next / or is folder path information passed in the file metadata and how is it accessed?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Path from File Path

Hi j3-crre,

 

If your path is static, I would suggest you use workflow definition language substring to return a subset of characters from a string.


For example, this function “substring('somevalue-abc-somevalue',10,3)” returns “abc”.


More details about the function, please check it at here:
https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language


Please have a try with it and feel free reply if you need more help.

 

Best regards,
Mabel Mao

 

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

1 REPLY 1
Community Support Team
Community Support Team

Re: Path from File Path

Hi j3-crre,

 

If your path is static, I would suggest you use workflow definition language substring to return a subset of characters from a string.


For example, this function “substring('somevalue-abc-somevalue',10,3)” returns “abc”.


More details about the function, please check it at here:
https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language


Please have a try with it and feel free reply if you need more help.

 

Best regards,
Mabel Mao

 

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

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

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!

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: 76 members 3,730 guests
Recent signins:
Please welcome our newest community members: