returns lists of file formats corresponding to all registered file name patterns.
FileNameToFormatList["file"]
returns a list of file formats that matches the file name "file".


FileNameToFormatList
Listing of Formats »returns lists of file formats corresponding to all registered file name patterns.
FileNameToFormatList["file"]
returns a list of file formats that matches the file name "file".
Details

- FileNameToFormatList returns a list of file formats that matches the file name.
- FileNameToFormatList returns a list of all formats {"fmt1",…} in the order that they are considered to be used as the format for the file given in the specified pattern.
Examples
open all close allBasic Examples (2)
Properties & Relations (4)
Filename and extension mapping is case insensitive:
A file name could match different formats:
FileFormat uses this list as a starting point to make a guess:
The first format returned by FileNameToFormatList is used by default in Export:
Specify a different export format:
It is possible to create a file with an incorrect extension. Create a PNG file with a .jpg extension:
FileNameToFormatList only looks at the file name:
FileFormat uses more sophisticated heuristics to determine the correct format:
See Also
Export FileFormatProperties SetFileFormatProperties MIMETypeToFormatList FileFormat FileFormatQ FileNames FileExtension
Front End Tokens: Import
Related Guides
History
Text
Wolfram Research (2021), FileNameToFormatList, Wolfram Language function, https://reference.wolfram.com/language/ref/FileNameToFormatList.html.
CMS
Wolfram Language. 2021. "FileNameToFormatList." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FileNameToFormatList.html.
APA
Wolfram Language. (2021). FileNameToFormatList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FileNameToFormatList.html
BibTeX
@misc{reference.wolfram_2025_filenametoformatlist, author="Wolfram Research", title="{FileNameToFormatList}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/FileNameToFormatList.html}", note=[Accessed: 11-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_filenametoformatlist, organization={Wolfram Research}, title={FileNameToFormatList}, year={2021}, url={https://reference.wolfram.com/language/ref/FileNameToFormatList.html}, note=[Accessed: 11-August-2025]}