This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

FileFormat

FileFormat["name"]
attempts to determine what Import format could be used to import the file or URL corresponding to "name".
  • FileFormat uses heuristic methods, and may not give correct results, particularly for shorter files.
  • FileFormat gets clues from both names of files and properties of files recorded in the filesystem, but bases the final result it returns only on the actual contents of files.
The Import format of a file:
A format name of the type used by Import:
The Import format of a file:
In[1]:=
Click for copyable input
Out[1]=
 
A format name of the type used by Import:
In[1]:=
Click for copyable input
Out[1]=
New in 6