GetNameFromPath
Back to ListDescription: Retrieve filename part from a full path
FileMaker Prototype:
Set Variable [$res; ACFU_GetNameFromPath( string_path)]
Category: UTILITY
Function source:
function GetNameFromPath ( string path )
FunctionID 3001;
if ( isWindows ) then
path = substitute ( path, "\\", "/");
end if
return regex_replace ("^(.*\/)?(.+\.[a-zA-Z0-9]{1,10})$", path, "$2");
end
The GetNameFromPath Function retrieve only the name part from a full filename path.
Example
Set Variable [$res; ACFU_GetNameFromPath( string_path)] 