File FormatsWhat makes a file recognizable as a photo, or as a video, or as any other type of file? And how does your computer know what program to use, to open each file?

No doubt you’ve already noticed that every file has an extension at the end, separated from the filename with a dot. That file extension indicates the file type, or format.

Graphical file extensions (such as .png, .jpg and .gif) indicate that the file is a photo or image, and that it can be opened with graphical viewing and/or editing programs.

Executable file extensions (such as .exe) indicate that the file is a program, and that it will open a program.

Etcetera.

Each file extension refers to a specific file format, or the method by which the file’s data is stored. The storage method then affects which programs can read each file.

I think it’s safe to say that there are well over a thousand different file formats. Considering the subject, that’s quite a large number.

The good news, is that most of us will only ever need to recognize 20-30 different file extensions. And that’s not even a requirement. It is a recommendation.

Filename Extensions

Below is a list of some common filename extensions and the formats that they refer to, along with some examples of programs that are commonly used to view and/or edit them.

Extension File Format Programs That Support This Format
ai Adobe Illustrator File Adobe Illustrator, Adobe Reader, Adobe Photoshop, Corel Paint Shop Pro, Etc.
apk Android Package Google Android SDK, Android phones, 7-Zip, WinRar, Etc.
avi Microsoft Audio/Visual Interleaved Video LAN VLC Media Player, Microsoft Windows Media Player, DivX 7, Etc.
bmp Microsoft Windows Bitmap MS Paint, Paint, Etc.
cdr CorelDRAW Image File Corel PaintShop Photo Pro, Corel WordPerfect Office, Adobe Illustrator, Etc.
csv Comma Separated Values File Microsoft Excel, OpenOffice, LibreOffice, Notepad, Etc.
divx Digital Video Express Encoded Movie File Video LAN VLC Media Player, Microsoft Windows Media Player, DivX 7, Etc.
doc, docx Microsoft Word Document Format Microsoft Word, AbiWord, Kword, Staroffice, OpenOffice, LibreOffice, Etc.
exe Executable DOS, OS/2, Windows
flv Flash Video VideoLAN VLC Media Player, Windows Media Player, Etc.
gif CompuServe Graphics Interchange Format Most (All?) Image Viewing/Editing Programs
htm, html Hypertext Markup Language File Browsers, Text Editors, Etc.
jpg, jpeg Joint Photographic Experts Group JFIF Format Most (All?) Image Viewing/Editing Programs
midi MIDI File Microsoft Windows Media Player, Etc.
mkv Matroska Video File VLC Media Player, Etc.
mov QuickTime Movie Apple QuickTime Player, Etc.
mp3 MPEG Layer 3 Audio Windows Media Player, Winamp, Real Player, XMMS, Etc.
mp4 MPEG-4 Video Stream Real Media Player, WinAmp, Windows Media Player, Etc.
ods OpenDocument Spreadsheet Microsoft Office, OpenOffice Calc, Etc.
odt OpenDocument Text Document Microsoft Office, OpenOffice Writer, Etc.
pdf Portable Document Format Adobe Reader, Ghostview, Okular, Etc.
png Portable Network Graphic Most (All?) Image Viewing/Editing Programs
pps, ppt, pptm, pptx PowerPoint Microsoft PowerPoint, Openoffice, Etc.
psd Adobe Photoshop Document Adobe Photoshop, GIMP, Etc.
rar WinRAR Compressed Archive Winzip, WinRAR, 7-Zip, Etc.
rtf Rich Text Format Microsoft Word, Wordpad, OpenOffice Writer, Etc.
sh Shell File Terminal, Etc.
svg Scalable Vector Graphics File Adobe Photoshop, Corel Paint Shop Pro, Corel SVG Viewer, Etc.
tar, tar.gz Consolidated Unix File Archive GNU Tar, 7-Zip, Etc.
tif Tagged Image File Format Microsoft Windows Photos, Etc.
txt Raw Text Notepad, WordPad, Etc.
wav WAVE Audio Microsoft Windows Media Player, Etc.
xls, xlsx Microsoft Excel Spreadsheet Microsoft Excel, OpenOffice, Etc.
zip ZIP Compression Winzip, WinRAR, 7-Zip, Etc.

File Naming Conventions

While file extensions are more or less out of our control, we have free reign over the actual file names (of our own files).

It goes without saying, that filenames should be unique, descriptive and still (when possible) concise, but are there any actual rules that need to be followed?

Yes, there are some basic guidelines that you should be following in order to promote peace and prosperity between you and your operating system – since it has to handle your files.

Note: Filenaming conventions should be applied when naming folders, etc. (not just files).

Some basic file-naming conventions are as follows:

1. Use primarily alphanumeric characters and spaces in filenames.

2. Hyphens and underscores are recommended replacements to spaces, in filenames that will be uploaded to a server and/or are often referenced from the command line.

3. Avoid using other characters such as ~!@#$%^&*`+’,”/\?<>|()[]{} whenever possible. Periods are generally considered acceptable in filenames, but not in folder names (especially in Linux).

4. Linux is a case sensitive system, while Windows is not, so keep this in mind when naming both files and folders.

5. CamelCase, the practice of writing compound words where each word begins with a capital letter, can make file-naming easier. (Example: ThisMakesADistinguishableFileNameWithNoSpaces)

6. Filenames should not exceed 255 characters in length. (I would love to see any filenames that you come up with that come close to 255 characters in length!)

7. Use file properties to provide additional details about a file that are not needed in the filename. (Right-click > Properties)

A little common sense is all that’s really needed to create fantastic file names.

Conclusion

Coming soon, to a blog near you — well, this blog actually — we’ll discuss file managers, and how they can be utilized to make file management a breeze.