I wanted to share some work with file formats and file extensions.
In[]:=
importformats=$ImportFormats
Out[]=
{3DS,7z,AC,ACO,Affymetrix,AgilentMicroarray,AIFF,ApacheLog,ArcGRID,ASC,ASE,AU,AVI,Base64,BDF,Binary,BioImageFormat,Bit,BLEND,BMP,BREP,BSON,Byte,BYU,BZIP2,CDED,CDF,CDX,CDXML,Character16,Character32,Character8,CIF,CML,Complex128,Complex256,Complex64,CSV,Cube,CUR,DAE,DBF,DICOM,DICOMDIR,DIF,DIMACS,Directory,DOCX,DOT,DTA,DXF,EDF,EML,EPS,ExpressionJSON,ExpressionML,FASTA,FASTQ,FBX,FCHK,FCS,FITS,FLAC,FLV,GaussianLog,GenBank,GeoJSON,GeoTIFF,GIF,GLTF,GPX,Graph6,Graphlet,GraphML,GRIB,GTOPO30,GXF,GXL,GZIP,HarwellBoeing,HDF,HDF5,HEIF,HIN,HTML,HTTPRequest,HTTPResponse,ICC,ICNS,ICO,ICS,IFC,IGES,Ini,Integer128,Integer16,Integer24,Integer32,Integer64,Integer8,ISO,JavaProperties,JavaScriptExpression,JCAMP-DX,JPEG,JPEG2000,JSON,JSONLD,JVX,KML,LaTeX,LEDA,List,LWO,LXO,MAT,MathML,Matroska,MBOX,MCTT,MDB,MESH,MGF,MIDI,MMCIF,MO,MOBI,MOL,MOL2,MP3,MP4,MPS,MS3D,MTP,MTX,MX,MXNet,NASACDF,NB,NDK,NetCDF,NEXUS,NOFF,NQuads,NTriples,OBJ,ODS,OFF,Ogg,ONNX,OpenEXR,OSM,OWLFunctional,Pajek,PBM,PCAP,PCX,PDB,PDF,PEM,PGM,PHPIni,PLY,PNG,PNM,POR,PPM,PXR,PythonExpression,QuickTime,RAR,Raw,RawBitmap,RawJSON,RData,RDFXML,RDS,Real128,Real32,Real64,RIB,RLE,RSS,RTF,SAS7BDAT,SAV,SCT,SDF,SDTS,SDTSDEM,SFF,SHP,SMA,SME,SMILES,SND,SP3,SPARQLQuery,SPARQLResultsJSON,SPARQLResultsXML,SPARQLUpdate,Sparse6,STEP,STL,String,SurferGrid,SVG,SXC,Table,TAR,TerminatedString,TeX,Text,TGA,TGF,TIFF,TIGER,TLE,TriG,TSV,Turtle,UBJSON,UnsignedInteger128,UnsignedInteger16,UnsignedInteger24,UnsignedInteger32,UnsignedInteger64,UnsignedInteger8,USD,USGSDEM,UUE,VCF,VCS,VideoFormat,VTK,WARC,WAV,Wave64,WDX,WebP,WL,WLNet,WMLF,WXF,X3D,XBM,XGL,XHTML,XHTMLMathML,XLS,XLSX,XML,XPORT,XYZ,ZIP,ZSTD}
In[]:=
exportformats=$ExportFormats
Out[]=
{3DS,AC,ACO,AIFF,ASE,AU,AVI,Base64,Binary,Bit,BLEND,BMP,BREP,BSON,Byte,BYU,BZIP2,C,CDF,CDXML,Character16,Character32,Character8,CML,Complex128,Complex256,Complex64,CSV,Cube,CUR,DAE,DICOM,DIF,DIMACS,DOT,DTA,DXF,EPS,ExpressionJSON,ExpressionML,FASTA,FASTQ,FBX,FCS,FITS,FLAC,FLV,FMU,GeoJSON,GIF,GLTF,Graph6,Graphlet,GraphML,GXL,GZIP,HarwellBoeing,HDF,HDF5,HIN,HTML,HTMLFragment,HTTPRequest,HTTPResponse,ICNS,ICO,IFC,IGES,Ini,Integer128,Integer16,Integer24,Integer32,Integer64,Integer8,ISO,JavaProperties,JavaScriptExpression,JPEG,JPEG2000,JSON,JSONLD,JVX,KML,LEDA,List,LWO,LXO,MAT,MathML,Matroska,Maya,MCTT,MGF,MIDI,MO,MOL,MOL2,MP3,MP4,MS3D,MTX,MX,MXNet,NASACDF,NB,NetCDF,NEXUS,NOFF,NQuads,NTriples,OBJ,OFF,Ogg,ONNX,OpenEXR,OWLFunctional,Pajek,PBM,PCX,PDB,PDF,PGM,PHPIni,PLY,PNG,PNM,POR,POV,PPM,PXR,PythonExpression,QuickTime,RawBitmap,RawJSON,RDFXML,Real128,Real32,Real64,RIB,RLE,RTF,SAS7BDAT,SAV,SCT,SDF,SMA,SMILES,SND,SPARQLQuery,SPARQLResultsJSON,SPARQLResultsXML,SPARQLUpdate,Sparse6,STEP,STL,String,SurferGrid,SVG,Table,TAR,TerminatedString,TeX,TeXFragment,Text,TGA,TGF,TIFF,TriG,TSV,Turtle,UBJSON,UnsignedInteger128,UnsignedInteger16,UnsignedInteger24,UnsignedInteger32,UnsignedInteger64,UnsignedInteger8,USD,UUE,VideoFrames,VRML,VTK,WAV,Wave64,WDX,WebP,WL,WLNet,WMLF,WXF,X3D,XBM,XGL,XHTML,XHTMLMathML,XLS,XLSX,XML,XPORT,XYZ,ZIP,ZPR,ZSTD}
In[]:=
Length[importformats]
Out[]=
256
In[]:=
Length[exportformats]
Out[]=
204
In[]:=
importbutnotexportformats=Complement[importformats,exportformats]
Out[]=
{7z,Affymetrix,AgilentMicroarray,ApacheLog,ArcGRID,ASC,BDF,BioImageFormat,CDED,CDX,CIF,DBF,DICOMDIR,Directory,DOCX,EDF,EML,FCHK,GaussianLog,GenBank,GeoTIFF,GPX,GRIB,GTOPO30,GXF,HEIF,ICC,ICS,JCAMP-DX,LaTeX,MBOX,MDB,MESH,MMCIF,MOBI,MPS,MTP,NDK,ODS,OSM,PCAP,PEM,RAR,Raw,RData,RDS,RSS,SDTS,SDTSDEM,SFF,SHP,SME,SP3,SXC,TIGER,TLE,USGSDEM,VCF,VCS,VideoFormat,WARC}
In[]:=
Length[importbutnotexportformats]
Out[]=
61
In[]:=
exportbutnotimportformats=Complement[exportformats,importformats]
Out[]=
{C,FMU,HTMLFragment,Maya,POV,TeXFragment,VideoFrames,VRML,ZPR}
In[]:=
Length[exportbutnotimportformats]
Out[]=
9
OpenEXR (.exr) is an example where the format “OpenEXR” is different from the extension .exr.
In[]:=
formatdifferentfromextension={{"OpenEXR","exr"}};
In[]:=
associationforformatdifferentfromextension=<|"Format"->#1,"Extension"->StringJoin[".",#2]|>&@@@formatdifferentfromextension
Out[]=
{FormatOpenEXR,Extension.exr}
Pajek graph data format (.net) is an example where the format is different from the extension.
In[]:=
AppendTo[formatdifferentfromextension,{"Pajek","net"}]
Out[]=
{{OpenEXR,exr},{Pajek,net}}
In[]:=
associationforformatdifferentfromextension=<|"Format"->#1,"Extension"->StringJoin[".",#2]|>&@@@formatdifferentfromextension
Out[]=
{FormatOpenEXR,Extension.exr,FormatPajek,Extension.net}
In[]:=
formatmatchesextension={};
In[]:=
AppendTo[formatmatchesextension,{"PBM","pbm"}]
Out[]=
{{PBM,pbm}}
In[]:=
associationforformatmatchesextension=<|"Format"->#1,"Extension"->StringJoin[".",#2]|>&@@@formatmatchesextension
Out[]=
{FormatPBM,Extension.pbm}
There are some things with the same file extension but different formats. There are conflicting file extensions. For example, you have .ma Maya files and .ma old Mathematica 2.2 notebooks.
In[]:=
conflictingfileextensions={};
In[]:=
AppendTo[conflictingfileextensions,{"Maya","ma"}]
Out[]=
{{Maya,ma}}
In[]:=
AppendTo[conflictingfileextensions,{"Mathematica 2.2","ma"}]
Out[]=
{{Maya,ma},{Mathematica 2.2,ma}}
In[]:=
associationforconflictingfileextensions=<|"Format"->#1,"Extension"->StringJoin[".",#2]|>&@@@conflictingfileextensions
Out[]=
{FormatMaya,Extension.ma,FormatMathematica 2.2,Extension.ma}
Here are two file paths.
This is an old Mathematica file.
In[]:=
StringLength[ReadString[File["E:\\ma-old-mathematica-2-point-2-notebook-files\\Assignment03.ma"]]]
Out[]=
12425
This is a Maya file.

section

I’m interested in graph formats, formats that conflict, and binary formats. I’m also interested in specialized formats for scientific data.
Conflicts
Considering that there are conflicts like .ws used for Wolfram script and whitespace or .m used for MatLab and Mathematica or .ma used for Mathematica and Maya and .gml used for Graphlet and Geography Markup Language, I think there should be some body that standardizes file extensions so you have to register your file extension to prevent conflicts. The conflicts are more likely with 1 character ones like .m, two character ones like .ma, and three character ones like .gml. The conflict is less likely with more characters like 4 characters like
There is a conflict with .b for BASIC and bc calculator tool. See https://en.wikipedia.org/wiki/List_of_filename_extensions_(A%E2%80%93E). There is a conflict with CDF for common data format--https://cdf.gsfc.nasa.gov/ and https://en.wikipedia.org/wiki/Common_Data_Format--and Wolfram’s Computable Document Format.
There seem to be a lot of uses for .dat including Clarion, Norton Utilities, and registry hive.
There is a conflict over EXP .exp with Drawing Express and Embroidermodder.
There is a conflict over F for Forth and Fortran.
There is a conflict for FS/.fs for F# and Forth source code files.
As mentioned earlier, there is GML for Geography Markup Language File and for Graphlet graphs.
M is used by Mathematica, Matlab, Mercury, and Objective-C.
MGF has a conflict with Wolfram System MGF bitmap format. Used by the Wolfram System user interface for storing raster images. MGF is an acronym for Mathematica Graphics Format. and Materials and Geometry Format.
MOD is used by AMPL and Modula.
PL is used by Perl, Prolog, and IRAF astronomical data.
R is used for R language, and Ratfor file.
RUN has 2 entries that conflict.
ST has 2 uses.
STC has 2 uses.
TS has 2 uses.
UI has 2 uses.
V has 2 uses.
WAD has 2 uses.
As mentioned before, sometimes WS is used for Whitespace programming language and Wolfram Script.
​