Documentation

file extension
identifier for a file format (e.g. txt for a text file) used as suffix to the file name. Don't use dot at start.
DescriptionSuffix to the file name, that indicates the file format
Representsfilename extension (Q186157)
Data typeString
Domain
According to this template: instances of file formats - file format (Q235557)
According to statements in the property:
file format (Q235557), programming language (Q9143), file format family (Q26085352) or filename extension (Q186157)
When possible, data should only be stored as statements
Allowed values
According to this template: 1 to 5 alphanumeric characters, underscore allowed
According to statements in the property:
[0-9a-zA-Z_@\+]+([\.\-][0-9a-zA-Z_@\+]+)?|
When possible, data should only be stored as statements
Exampletext file (Q86920) → txt
GEDCOM (Q667761) → ged
SourceSee: list of file formats (Q914874) (note: this information should be moved to a property statement; use property source website for the property (P1896))
Tracking: sameno label (Q42533424)
Tracking: usageCategory:Pages using Wikidata property P1195 (Q26690097)
See alsofilename in archive (P7793)
Lists
Proposal discussionProposal discussion
Current uses
Total20,165
Main statement15,10474.9% of uses
Qualifier5,05625.1% of uses
Reference5<0.1% of uses
Search for values
[create Create a translatable help page (preferably in English) for this property to be included here]
Format “[0-9a-zA-Z_@\+]+([\.\-][0-9a-zA-Z_@\+]+)?|: value must be formatted using this pattern (PCRE syntax). (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). Known exceptions: CrLZH (Q28600441)
List of violations of this constraint: Database reports/Constraint violations/P1195#Format, SPARQL
Item “media type (P1163): Items with this property should also have “media type (P1163)”. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P1195#Item P1163, search, SPARQL
Allowed entity types are Wikibase item (Q29934200): the property may only be used on a certain entity type (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P1195#Entity types
Scope is as main value (Q54828448): the property must be used by specified way only (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P1195#Scope, SPARQL
 
This property is being used by:

Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.)


  Pattern ^\.([0-9a-zA-Z_@\+]+([\.\-][0-9a-zA-Z_@\+]+)?)$ will be automatically replaced to \1.
Testing: TODO list

Usage unclear edit

Example: text file (Q86920)=>.txt

Looks like a misunderstanding. There is no reason, why a text should have this ending. The example given in en:Text file is ".csv". pdf, doc etc. are all text files. So what is the use of this property? Was it meant for software? Than we should use "item" and not "string". --Kolja21 (talk) 12:14, 26 February 2014 (UTC)Reply

@Kolja21: I think you are right about the example. A text file is just any file that contains mostly text. And this property should be assigned to file-formats and not things like "spreadsheet", "database file", "textfile", but rather "xls-file-format", "odb-file-format", "txt-file-format". --Tobias1984 (talk) 08:18, 27 February 2014 (UTC)Reply

Availability for programming languages edit

I think this property should also be available for programming languages. The Infobox programming language in the english Wikipedia also has a file extension property ("file ext"). --Stiegenaufgang (talk) 17:47, 18 April 2014 (UTC)Reply

The "item requires statement constraint" (Q21503247) for media type does not make much sense edit

Most file extensions do not have a distinct associated media type. Assigning a generic media type such as text/plain or application/octet-stream in such cases does not seem to make sense either. As a consequence the constraint causes many constraint violation errors. It should probably be removed. Trilemma2 (talk) 21:02, 2 February 2020 (UTC)Reply

Thank you for this comment, I totally agree with you. Antoine Legrand (talk) 22:12, 19 July 2022 (UTC)Reply
Strongly agree with this. MIME types and file extensions are completely unrelated, other than both being indicia of a file format/type. Eiim (talk) 01:30, 15 September 2023 (UTC)Reply
Return to "P1195" page.