And many uses of a filepath in FileMaker will requre replacing the \ with /. If that's what you need then enclose the If function in a substitute function call to make the character substitution: Substitute ( If ( p ; left ( path ; p - 1 ) ; "\\" ; "/" )

Note: the backslash, \ , has a special purpose inside quoted strings so you have to put in two of them in order for FileMaker to evaluate it as a single \ character.