GetItemName ( Path )
Gives back the name of a file or a folder from a path
Average rating: 4.2 (5 votes) Log in to vote
Christophe Cossement Lemon Pie http://www.cobraradiobrewery.com |
/User/.../Documents/Test.txt
/User/.../Documents/Test/
Test.txt
Test
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function changes the "/" in a path to "¶" to get a list, then gives the last element of this list
Comments
comment, VR Jan 22, 2017 |
||
RightValues ( Substitute ( path ; "/" ; "¶" ) ; 1 ) would have worked just as well. Let ( v = Substitute ( path ; "/" ; "¶" ) ; GetValue ( v ; ValueCount ( v ) ) ) would work even better, since it would return the last token witout a trailing carrige return. |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.