ACF Library

GetNameFromPath

Back to List

Description: 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)]
Back to List