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

Using left function to extract filepath dynamically in onedrive for business

I'm attempting to recreate functionality we're currently using in excel.  The file path contains path+file name and extension.  I'd like to replicate the following using flows:

 

DynamicFolder=left(filepath,len(filepath)-((len(filename)-1)

 

DynamicFolder would be the location that new files would be relocated  

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Using left function to extract filepath dynamically in onedrive for business

Hi @KUNGFUPANDA559 ,

 

Do you want to extract the path and file name from a string?

 

There is no left/right/middle function could be used in Microsoft Flow, please consider using the function take and skip instead.

 

More details about the functions, please check it at here:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#t...

 

I have made the following test for your reference.

 

Path + file name and extension are stored in an Excel file likes below:

Attachment/tabletest.xlsx

 

To get the File path, use the following function:

take(items('Apply_to_each')?['path'],10)

 

To get the File name with extension, use the following code:

skip(items('Apply_to_each')?['path'],10)

1.PNG

 

Please take it for a reference and try it on your side.

 

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

1 REPLY 1
Community Support Team
Community Support Team

Re: Using left function to extract filepath dynamically in onedrive for business

Hi @KUNGFUPANDA559 ,

 

Do you want to extract the path and file name from a string?

 

There is no left/right/middle function could be used in Microsoft Flow, please consider using the function take and skip instead.

 

More details about the functions, please check it at here:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#t...

 

I have made the following test for your reference.

 

Path + file name and extension are stored in an Excel file likes below:

Attachment/tabletest.xlsx

 

To get the File path, use the following function:

take(items('Apply_to_each')?['path'],10)

 

To get the File name with extension, use the following code:

skip(items('Apply_to_each')?['path'],10)

1.PNG

 

Please take it for a reference and try it on your side.

 

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

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: 97 members 3,028 guests
Please welcome our newest community members: