A suffix appended to the end of a filename, in order to identify the type of file. It is (typically) separated from the filename by a period symbol.
Questions tagged [file-extension]
1147 questions
132
votes
9 answers
Changing file extension in Python
Suppose from index.py with CGI, I have post file foo.fasta to display file. I want to change foo.fasta's file extension to be foo.aln in display file. How can I do it?

MysticCodes
- 3,092
- 5
- 25
- 33
130
votes
17 answers
find files by extension, *.html under a folder in nodejs
I'd like to find all *.html files in src folder and all its sub folders using nodejs. What is the best way to do it?
var folder = '/project1/src';
var extension = 'html';
var cb = function(err, results) {
// results is an array of the files with…

Nicolas S.Xu
- 13,794
- 31
- 84
- 129
127
votes
3 answers
git grep by file extensions
I know that, if I wanted to grep for a pattern only on files with certain extensions, I could do this:
// searches recursively and matches case insensitively in only javascript files
// for "res" from the current directory
grep -iIr --include=*.js…

Vinay
- 6,204
- 6
- 38
- 55
114
votes
8 answers
Is there an idiomatic file extension for Jinja templates?
I need to programatically distinguish between Jinja template files, other template files (such as ERB), and template-less plain text files.
According to Jinja documentation:
A Jinja template doesn’t need to have a specific extension: .html, .xml,…

Chris Tonkinson
- 13,823
- 14
- 58
- 90
113
votes
8 answers
What are .S files?
I've seen .S files in various projects such as in the Linux Kernel, FreeBSD kernel, or in some other projects. What do these files do and why can't we have .c files instead ?

Eastern Monk
- 6,395
- 8
- 46
- 61
107
votes
3 answers
What are the .db-shm and .db-wal extensions in Sqlite databases?
I am seeing some strange behavior with my application and the state of its database file after running some tests that close the database, delete it, and replace it with a test fixture. When I examine the database file with a tool on my debugging…

Jeff Axelrod
- 27,676
- 31
- 147
- 246
97
votes
26 answers
How to get file extension from string in C++
Given a string "filename.conf", how to I verify the extension part?
I need a cross platform solution.

JeffV
- 52,985
- 32
- 103
- 124
87
votes
5 answers
What does the .csproj file do?
Usually a C# project has a .csproj file associated with it. What is that file for? What data does it contain?

Mircea
- 3,369
- 6
- 27
- 26
85
votes
11 answers
Changing file extensions for all files in a directory on OS X
I have a directory full of files with one extension (.txt in this case) that I want to automatically convert to another extension (.md).
Is there an easy terminal one-liner I can use to convert all of the files in this directory to a different file…

Ben McCormick
- 25,260
- 12
- 52
- 71
79
votes
5 answers
Which language uses .pde extension?
While searching for an implementation of the Barnsley's Fern fractal I came across a implementation that has .pde extension. Which programming language uses this extension?
Implementation Page

Hamza Yerlikaya
- 49,047
- 44
- 147
- 241
78
votes
9 answers
Is there a standard file extension for gnuplot files?
I have seen .gnu, .plt, and .gplot as file extensions for gnuplot scripts.
I know Linux doesn't care about file extensions, but what extension most universally declares to human beings "I am a gnuplot script!"?

Philip
- 4,128
- 5
- 31
- 49
73
votes
9 answers
Extract file extension from file path
How can I extract the extension of a file given a file path as a character? I know I can do this via regular expression regexpr("\\.([[:alnum:]]+)$", x), but wondering if there's a built-in function to deal with this?

Suraj
- 35,905
- 47
- 139
- 250
71
votes
4 answers
Which programming language has extension .do
Just wondering which programming languages is used on the web pages with the extension ".do"

Roman
- 775
- 1
- 6
- 8
70
votes
1 answer
asp.net mvc HttpPostedFileBase getting file extension
public string ContructOrganizationNameLogo(HttpPostedFileBase upload, string OrganizationName, int OrganizationID,string LangName)
{
var UploadedfileName = Path.GetFileName(upload.FileName);
string type = upload.ContentType;
…

maztt
- 12,278
- 21
- 78
- 153
69
votes
11 answers
List of ALL MimeTypes on the Planet, mapped to File Extensions?
Is there a resource that lists ALL the mimeTypes in existence?
I have found a few places with under 1000 mimeTypes, but then they still don't include common ones like .rar, .fla, .rb, .docx!
Does anyone have a COMPLETE list of mimetypes? Not down…

Lance
- 75,200
- 93
- 289
- 503