cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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
v-yamao-msft
Community Support
Community Support

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
v-yamao-msft
Community Support
Community Support

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
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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,654)