Unfortunately the extentions not limited to 3 chars only. If you want to do it this wat it must be:
lcFileType = SUBSTR(tcFilePath,RAT([.],tcFilePath)+1)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.