The file_format (x) function returns the type of file 'x'. The file must exist.
Possible return values;
unknown: Unable to determine the type of the file.doc: Microsoft Word document.docx: Microsoft Word Open XML document.rtf: Rich Text Format (RTF) document.ps: PostScript file.pdf: PDF document.sxw: OpenOffice.org / StarOffice.odt: Open Document Format (ODF).lwp: WordPro document.wpd: WordPerfect document.These are values of type Text.
file_format ("c:\mydir\somefile")
Result: one of the listed responses