What does a file extension tell your computer?

A file extension, or file name extension, is the letters immediately shown after the last period in a file name. For example, the file extension.txt has an extension of .txt. This extension allows the operating system to know what type of file it is and what program to run when you double-click on it. There are no particular rules regarding how an extension should be formatted other than it must begin with a period and have at least one character after it. For the most part, file extensions consist of three characters, which are typically letters or digits, that textually represent the type of file it is. Some examples of file extensions include .txt, .mp3, .jpg, and .gz, which represent text files, mp3 files, jpeg image files, and files compressed with the gzip program. As you can see, the actual extension name gives clues as to the type of file it is.

When trying to determine a file's extension it is important to remember that the extension is simply the last period in a file and the characters that follow it. If there is no period in a file, then it does not have an extension. To make it easier to see what a files extension are, please see the examples in the chart below:

FilenameExtensionNotesreport_card.txt.txtThe extension is the period followed by the remaining characters.Terminal.app.appThe extension is the period followed by the remaining characters.Postcard.pdf.exe.exeThis one is a bit tricky, because there are two periods in this file. The important thing to remember is the extension is the last period and the characters that follow it.

As already said, an operating system knows what programs to use in order to view, print, or edit a particular file by looking at its file extension. It is able to do this because each operating system has in its configuration a default mapping between a particular file extension and a particular program. Using this information, when a user clicks on a file, the operating reads the file extension and then launches the mapped application. Typically, if the extension is unknown to the operating system or no application mapping exists, it will prompt the user to specify the program that it would like to open the file with.

By defaults, Windows and the Mac OS do not show file extensions. To view file extensions you would first need to enable them using the following guides:

It is also possible to change the program that your operating system uses to open a particular extension. This will be described in tutorials that can be found in the section below.

How to change the program associated with a file extension

As already mentioned, file extensions are mapped to a particular program so that when you attempt to use the file, the operating system knows which application to launch. There may come a time that you wish to change a default association so that you can use a different program to automatically open the file. For example, when you open a image file on Windows it defaults to using the pre-installed Windows Photo Viewer. In the future if you find a new program that you would like to use instead, you can change the associations for image files so that they instead are opened by the new program.

For more information about how to change the default program a file extension opens with, please select one of the tutorials below based upon your particular operating system:

How malware writers use extensions to trick you into running a virus

A common trick that malware developers will use to trick you into running a computer infection is to send an email attachment that has a file name that contains two periods in it. An example of this type of file name is sales_report.xls.exe. As you can see the file has an .exe extension on it, which means it is an executable. Seeing that a file has this name and is an executable is enough of a hint that you should probably not run the program. On the other hand, what happens if there was a way to make it so that the .exe extension was stripped from the file name so that it appears as sales_reports.xls? That is a much more innocuous looking name, and if you receive this from someone you work with who may be infected, there is a good chance you will think it is legitimate and therefore double-click on it. Once you double-click on it, the file will then execute, because it is actually an executable, and infect your computer.

The malware developers know that this method works because by default Windows does not show you file extensions. Therefore, if you do not have file extensions enabled, windows will just show you everything before the last period in the file name and you may think that it is the full name. Therefore, it is a common tactic for network worms or spammers to send out attachments containing these "double" extensions as they know that Microsoft will strip off the last one and thus making it seem like a safe file.

Due to this, it is important to always show file extensions in Windows so that you cannot mistakenly fall for this trick. For information on how to enable file extensions, please see this tutorial:

How to show File Extensions in Windows

Common File Extensions

Below are a list of common file extensions that you may find on your computer or over the Internet.

Audio Extensions

ExtensionDescription.aifA Audio Interchange File is an audio file format that is most commonly used on Apple Macintosh computer systems..m3uM3U files are used to store multimedia play lists..mp3An MP3 file is the most common file format used to store digital audio for use on computers and digital media devices..raAudio files created by RealAudio..wavA WAV, or Waveform Audio File Format, is a audio file format used to store audio on PCs..wmaWindows Media Audio, or WMA, files is a audio file format developed by Microsoft.

Video Extensions

ExtensionDescription.aviA Audio Video Interleave, or AVI, file is a video and audio file created by Microsoft..flvFlash video files..movApple QuickTime movie..mp4A video file..mpgA MPEG video file.wmvA Windows Media Video, or WMV, file is a video file type created by Microsoft.

Image Extensions

ExtensionDescription.bmpA Bitmap, or BMP, file is an image file used to store bitmap digital images. These files are typically found in Windows..curThe CUR file format is used to store non-animated cursors in Windows..icoThe ICO file format is used to store computer icons in Microsoft Windows..gifA Graphics Interchange Format, or GIF, is an image file format created by Compuserve. This is a common format to find on a computer and the Internet..jpgA JPEG image file is a common file found on computers and the Internet..jpegAnother extension that corresponds to a JPEG image file..pngA Portable Network Graphic, or PNG, is an image file that was created to replace GIF files. This is a common format to find on a computer and the Internet..psdA Photoshop Document, or PSD, file is used to store images created by Adobe Photoshop..rawThe raw image format is commonly used by digital cameras to save a picture in a format that has not currently been processed..tifThe Tagged Image File Format, or TIF, is an image file that is commonly used by graphic artists and photographers.

Workplace Applications and Text Files Extensions

ExtensionDescription.csvA Comma Separated Value, or CSV, file is a text file that contains lines of data that are separated by commas..docA Word Document, or DOC, file is the extension that Word would save its documents..docxStarting in Word 2007, the .docx file format became the standard file that Microsoft Word would save files as..logA text file typically containing a textual log of what an application or computer process has done or transmitted..pdfA Portable Document Format, or PDF, file is a file format that was created by Adobe Systems. This file format is used to create documents that contain a specific fixed layout regardless of the operating system or application that opens them..ppsA Microsoft PowerPoint slide show file..pptA PowerPoint Document, or PPT, file is the extension that PowerPoint would save its documents..pptxStarting in PowerPoint 2007, the .pptx file format became the standard file that Microsoft PowerPoint would save files as..rtfA Rich Text Format, or RTF, file was created by Microsoft to allow the formatting of text, such as bold or underline, in a text document..txtA text file is a file that contains textual data without any formatting..wpdThe standard file format for saving WordPerfect documents..wpsA Microsoft Works document..xlrA Microsoft Works spreadsheet file..xlsA Excel Document, or XLS, was the standard file format that Microsoft Excel would saved files as. This was changed to .xlsx starting with Excel 2007..xlsxStarting in Excel 2007, the .docx file format became the standard file that Microsoft Excel would save files as.

Compressed Files or Archive Extensions

ExtensionDescription.7zAn archive format that was originally created by the 7-Zip archiver..bz2A file that was compressed using bzip2. This file format is commonly used on Linux and Unix systems..cabA Cabinet, or CAB, file is a compressed archive format used by Microsoft..debA Debian Software Package, or DEB, file is a file used to install applications in Debian..gzA file that was compressed using gzip. This file format is commonly used on Linux and Unix systems..pkgA Package, or PKG, file is a file used to install applications in Apple OS..rarA Roshal Archive, or RAR, file is an archive format used by WinRar..rpmA RPM Package Manager, or RPM, is a file that used to install applications in Linux operating systems..sitA Stuffit, or SIT, file is a compressed archive that was developed by Stuffit..sitxA Stuffit X-compressed, or SITX, file is a compressed archive from Stuffit..tarAn archive file created by the Tar utility. This type of file format is commonly found on the Linux & Unix operating systems..tar.gzA Tar file that was compressed using the Gzip utility..zipA ZIP file is a compress archive file. This is the most common and popular compressed archive that you will find on a computer and in the Internet. Windows and Macintosh have built-in support for Zip files..ZA file that has been compressed with the Linux or Unix compress command.

Web & Internet Extensions

ExtensionDescription.cssA Cascading Style Sheets, or CSS, file contains style sheet language that dictates how the HTML in a HTML file should be displayed..htmA Hypertext Markup Language, or HTML, files contain HTML markup language, which is used to display formatted content on web pages..htmlA Hypertext Markup Language, or HTML, files contain HTML markup language, which is used to display formatted content on web pages..jsA Javascript, or JS, file contains scripts that should be executed by your web browser..partWhen you download a file, the downloaded information will be stored in a part file until it is completed. Once it is completed, the file will then be renamed into the files' actual name.

Disk Image Extensions

ExtensionDescription.dmgAn Apple Disk Image, or DMG, file is a file that contains a archive of a hard disk or CD/DVD..isoAn ISO image is an archive of an optical drive, such as a CD or DVD drive.

E-Mail Extensions

ExtensionDescription.emlSome applications like Microsoft Outlook Express, Windows Mail, and Mozilla Thunderbird save your e-mail as individual eml files on your hard drive. If you double-click them, your mail client will open the individual email that it represents..emlxSimilar as the .eml files, but are for Apple Mail messages..mbxA MBX file that represents a particular folder in your mail client. The name of the file will typically be named after the actual folder it represents..pstA Microsoft Outlook data file that contains all of your contacts, e-mail, mailboxes, and calendar..vcfA vCard, or VCF, is a file that acts as an electronic business card. When you receive these via email, you can open them and have the details of the contact imported into your Mail Client.

Executable Extensions

ExtensionDescription.appAn Application, or APP, is a Mac OS application. These applications are actually folders with the extension of .App..batA batch file is a text file containing a series of commands that will be executed when the batch file is launched..cgiA Common Gateway Interface, or CGI, file is an executable file that is allowed to run on a web server..comThis is an executable file for Dos & Windows operating systems..exeThis is an executable file for Dos & Windows operating systems..pifA Program Information File, or PIF, file is used to launch a DOS program in a Windows multi-tasking environment using certain settings..vbsA file containing visual basic script that can be executed by double-clicking on it.

Windows Extensions

ExtensionDescription.cplA Windows Control Panel file. Double-clicking this will launch the associated control panel..dllA Dynamic Link Library, or DLL, is a shared library in Windows. Executables will use these DLL files in order to properly run..dmpA memory dump file that was generated by Windows when a program crashed. These memory dump files can be used to determine why a particular program crashed..lnkThese types of files are links or shortcuts to an executable located elsewhere on the Windows operating system. These .lnk files are just a pointer to the executable and can be deleted without affecting the executable itself..msiA Windows installer file that can be used to install an application on your computer..regA Windows Registry file that can be used to make modifications to the Windows Registry. You should never double-click on these unless you know what they are going to do..sysA Windows driver files that allows Windows to communicate with the hardware installed on your computer..tmpA temp file created by a program. These temp files should be deleted automatically when a program is closed. They are safe to remove.

Settings Extensions

ExtensionDescription.cfgA config file that contains configuration information on how a piece of software should operate..confA config file that contains configuration information on how a piece of software should operate..iniAn initialization file that contains settings a program will configure itself with when it starts.

Font Extensions

ExtensionDescription.fntA Windows font file. If you double-click this type of file you will be able to see the particular font in numerous sizes..fonA Windows font file. If you double-click this type of file you will be able to see the particular font in numerous sizes..ttfA TrueType font file. If you double-click this type of file you will be able to see the particular font in numerous sizes.

Programming & Source File Extensions

ExtensionDescription.aspAn Active Server Pages, or ASP, source file that contains source code for Microsoft's ASP server-side scripting language..cA C file contains source code for the C programming language..cppA CPP file contains source for the C++ programming language..hA header file for the C/C++ programming language..javaA Java file contains the source code file for the JAVA programming language..phpA PHP file contains the source code file for the PHP programming language..plA PL file contains the source code file for the PERL programming language..pyA PY file contains the source code file for the Python programming language..xmlAn Extensible Markup Language file. These types of files offer a way to textual data in a manner that it can be used by any program that supports the XML language.

What does a file extension tell you about the file quizlet?

A file extension associates a digital file with a program or tells you the type of file it is. It comes after the file name and includes a "dot" and characters. "Executable" file.

What is the meaning of extension in computer?

2) In programming, an extension is a file containing programming that serves to extend the capabilities of or data available to a more basic program. Extensions are sometimes required to be stored in a separate extensions file so that they're easy to locate.