FileExtension

FileExtension["file"]
gives the extension for the specified file name.