Brian Dunning's FileMaker Custom Functions

getPathPart ( Pathname ; Number )

Parses pathname for each part

  Average rating: 4.6 (28 votes) Log in to vote

Roger Biel   Roger Biel
2Geckos Consulting, LLC
www.2geckos.com

Share on Facebook Share on Twitter

  Sample input:
C:/Users/Roger/WebWizDirect/Knozall/ ; 1
C:/Users/Roger/WebWizDirect/Knozall/MyTest.txt ; 2
C:/Users/Roger/WebWizDirect/Knozall/MyTest.txt ; 1
C:/Users/Roger/WebWizDirect/Knozall/MyTest.txt ; 99
  Sample output:
Knozall
WebWizDirect
MyTest.txt
txt

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Option number
0: Returns parent folder
1: Returns the target file or folder name
2-3-4-ect: Returns each part of the pathname
-1: returns Path only
99: returns file extenstion

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: