What's the easiest way of determining the suffix of a file?

G’day

I’ve seen, somewhere on these pages, a way of getting the file suffix, that was as easy as something like

set thesuffix to suffix of theFile.

but I can’t find it anywhere.

Any help please.

Regards

Santa

Model: G5 1.8 GHz
AppleScript: 2.1.1
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

:smiley:

set the_file to choose file
set suffix to name extension of (info for the_file)
display dialog name extension of (info for (choose file))

That was QUICK, thanks James & Stefan

Thank stefan, his rocket like responses prompt me to try and move ever faster :stuck_out_tongue: