ExtractFileName
Structure
ExtractFileName(sFileName: Text): Text
Type
Function
Description
This function will extract the filename and extension from a full path that includes directory+file name+extension. Basically this function will start reading from right to left and assemble the function result until it reaches either a '' or '/' character.
Parameters: 1
sFileName = the name of the full directory+file name+extension
Return Value
Text
Examples
ShowMessage(ExtractFileName('C:\test\subdir\MyFile.PDF'))
ShowMessage(ExtractFileName('http://mywebserver.com/somedir/MyFile.PDF'))
' both would show: 'MyFile.PDF' |