FileNameToFormatList

Listing of Formats »

FileNameToFormatList[]

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 all

Basic Examples  (2)

Get the formats associated with a specific filename:

Get the formats association to an extension:

Scope  (1)

Get the association of all file name pattern mappings:

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:

Wolfram Research (2021), FileNameToFormatList, Wolfram Language function, https://reference.wolfram.com/language/ref/FileNameToFormatList.html.

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_2024_filenametoformatlist, author="Wolfram Research", title="{FileNameToFormatList}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/FileNameToFormatList.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_filenametoformatlist, organization={Wolfram Research}, title={FileNameToFormatList}, year={2021}, url={https://reference.wolfram.com/language/ref/FileNameToFormatList.html}, note=[Accessed: 22-November-2024 ]}