Re: Extracting numbers from Folder Path
If the folder path will never change, use the following expression:
last(take(split(variables('FolderPath'),'/'),4))
Just replace "variables('FolderPath')" with your appropriate value.
IF you care to know what this does I've explained below, or you can just cut and paste and go on your merry way!
1. Split will take a string and split it into individual components based on some delimiter, In this case you would use "/" as your delimiter and split will break it into Shared Documents, Folder and 665 (also the before and after blanks).


2. Take will take the x number of values in an array/object, so in this case I am taking the first 4 items of from the split call above (why...the answer is in the next step).

3. And now I can use the LAST function to grab the last item in this split function. Note, the last item from just split is a blank because of the extra / and the end of the folder path.

4. Now you can string all of these expressions together instead of individual steps...but split them to explain this to you. Here it is all in the one expression that I said to use.

And finally the actual run showing the results....



