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 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 allclose 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:
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