Most of us always append file extensions to the filename for almost every file we save. However, how necessary is it actually? For instance, most Linux software works with files that do not have extensions just fine.
3 Answers
Short answer: No, we don't need them.
Besides their obvious benefits, indeed file extensions are not necessary even in Windows.
To test this (e.g. on Windows 7) remove the extension of an arbitrary file then double click on it. You'll see that Open with dialogue box appears.
Summary: file extensions have many benefits that make them useful, but not necessary. File extensions contain some metadata, whilst files contain the actual contents.
As a complement, you may find a rather general information about file extensions here.
- 425
Without extension in file name you need to read raw data and a decode handler, which could lead to overflow and other exceptions. Its faster and simpler to read extension after last dot in file name.
- 4,324
- 135
I can think of the following benefits of using file extensions:
- Some software won’t correctly handle a file with no extension
- In some cases file name based validation may occur (for instance, most websites won’t let you upload a photo with no extension in the filename)
- Files with extensions are easier (and faster!) to find
- Even if these files are easily open on your platform (Linux), you may want to also share them with somebody who uses another OS
Other than that, I think there’s no real advantages of putting extensions in the names of the files stored on your disk (at least for files in the formats that have signatures). So it’s more a matter of style.
- 211
Open withdialogue box is a pretty awful user experience - especially when you consider that Windows won't remember the program you selected (so the next time you click on it, you'll have to select the program again) nor will it associate that program with the MIME type of the file you opened (so if you open another file created by the program, you are still going to have to select that program again). – Richard Jul 11 '14 at 14:57