Parsing through a directory

Hi All. I have a program that reads input files and produces output files. The folder that contains the inputfiles is selected by the user. Now, I look through folderitem.item up to folderitem.count to perform something on each element in the folder. What if I wanted to be selective over which files are input files, e.g. use the same folder for output files and somehow ignore the output files. I could go about this by parsing the title of the input files and looking for some phrase or extension. Is this the easiest way? Is there a way to quickly get the extension of a folderitem? The type property does not seem to contain the relevant information.

use COUNTFIELDS and NTHFIELD parsing F.DISPLAY name using period as the delmiter

You want the Last field

ext=NthField(f.displayname,".",CountFields(f.displayname,"."))

thank you dave - always brilliant advice