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
60
votes
2 answers
What is the difference between creating JSF pages with .jsp or .xhtml or .jsf extension
I saw some examples creating the JSF pages with .jsp extension, other examples creating them with .xhtml extension, and other examples choose .jsf.
I just would like to know what the difference is between above extensions when working with JSF…

fresh_dev
- 6,694
- 23
- 67
- 95
58
votes
10 answers
Javascript - get extension from base64 image
I have a base64 encoded image returned from a service and it looks like…

itsme
- 48,972
- 96
- 224
- 345
57
votes
10 answers
Does groovy have an easy way to get a filename without the extension?
Say I have something like this:
new File("test").eachFile() { file->
println file.getName()
}
This prints the full filename of every file in the test directory. Is there a Groovy way to get the filename without any extension? (Or am I back in…

Electrons_Ahoy
- 36,743
- 36
- 104
- 127
56
votes
1 answer
What is the difference between .m and .mat files in MATLAB
When I traced my reference MATLAB script, I found files with the .mat extension. My questions are:
What is the difference between .mat and .m files?
How does one open files with the .mat extension?

user477670
- 595
- 1
- 4
- 5
56
votes
4 answers
What's the difference between .lib and .a files?
I'm trying to statically compile something and I'm trying to get a handle on what all these dependencies are. I know that .dll files are for dynamically linked dependencies that will be required by the final output, but what are .a and .lib files…

Nantucket
- 1,647
- 3
- 14
- 25
55
votes
2 answers
What is the difference between *.sqlite and *.db file?
What is the difference between a *.sqlite and a *.db file?

techno
- 773
- 2
- 8
- 16
54
votes
7 answers
File extensions and MIME Types in .NET
I want to get a MIME Content-Type from a given extension (preferably without accessing the physical file). I have seen some questions about this and the methods described to perform this can be resumed in:
Use registry information.
Use urlmon.dll's…

Marc Climent
- 9,434
- 2
- 50
- 55
52
votes
2 answers
Temporary file with specific file extension in Python 3
I am writing some unit tests for a piece of code that takes a path and attempts to load the file if it has a known extension, then does more careful checking.
In the unit test, I would like to create a temporary file that has the correct extension,…

Benjamin
- 11,560
- 13
- 70
- 119
51
votes
7 answers
How to get only images using scandir in PHP?
Is there any way to get only images with extensions jpeg, png, gif etc while using
$dir = '/tmp';
$files1 = scandir($dir);

esafwan
- 17,311
- 33
- 107
- 166
51
votes
11 answers
Convert all file extensions to lower-case
I'm trying to lower-case all my extensions regardless of what it is. So far, from what I've seen, you have to specify what file extensions you want to convert to lower-case. However, I just want to lower-case everything after the first last dot . in…

thevoipman
- 1,773
- 2
- 17
- 44
48
votes
11 answers
How to get the file extension in Android?
I am a newbie.
I have an EditText and a Browse Button to explore Folders and select files only.
From the Browse Button, when a file is clicked it stores the folder path in which that file is in one string and the file name without extension in other…

Bati
- 529
- 3
- 6
- 15
46
votes
4 answers
Create registry entry to associate file extension with application in C++
I would like to know the cleanest way of registering a file extension with my C++ application so that when a data file associated with my program is double clicked, the application is opened and the filename is passed as a parameter to the…

Seth
- 8,213
- 14
- 71
- 103
45
votes
1 answer
Which MIME type is correct for the .exe file?
I try to find which MIME type corresponds to the each extension and I get ambiguous results.
According to webdesign.about.com the correct MIME for exe is: application/octet-stream
According to freeformatter.com the correct MIME for exe is:…

Yoda
- 17,363
- 67
- 204
- 344
44
votes
9 answers
Is there a way to just commit one file type extension from a folder?
I have a folder with a lot of stuff and I would like just to commit ".c" extension files. Is there a command to do this or do I need to add each file name manually?

Victor Oliveira
- 3,293
- 7
- 47
- 77
41
votes
4 answers
Can I use images without extension in
?
Possible Duplicate:
Is it safe to serve an image on the web without an extension?
I'd like to use something like
in a page. FireFox won't display it, which makes me think I have to have a…

Bojangles
- 99,427
- 50
- 170
- 208