How do I change file extension in Windows 7?

How do I change file extension in Windows 7? cover image
  1. Home
  2. How Do I
  3. How do I change file extension in Windows 7?

The name of a file on your Windows 7 computer consists of two parts. When you view files in Windows Explorer it displays only the first part, the file extension is hidden. The file extension is used to specify the file type and associate it with a program. Thus, Microsoft Word documents have the extension .doc or the new .docx.

File extensions are generally 3 or 4 characters long. Since these not displayed in Windows Explorer, users come to know of the file type by the file icon. Below is a screenshot of the music folder of my computer. Though most files are .mp3, there are some .mp4 songs too but there is no way to distinguish between the two, unless they were associated with different programs; say, MP3 files with Winamp music player and AAC (.m4a) with iTunes.

Sponsored Links

Music folder from my computer where no file extensions are displayed - the default for Windows 7

Why is the file extension hidden in Windows 7?

Since the extension associates the file with a particular program, changing it would cause problems in opening and/or viewing the file. For instance, replacing .mpg with .doc as the file extension will cause all sorts of trouble since Microsoft Word will not be able to open the video file. Microsoft understands this danger and has, thus, kept the file extensions hidden by default.

Two ways to change the file extension in Windows 7

There are two methods you can use to change the file extension. The first one involves using the familiar Windows Explorer program and the second, the Command Prompt. The latter requires you to know a couple of DOS commands and would sound a little intimidating for the beginner.

Windows Explorer method of changing the file extension
You first need to get file extensions to show in Windows 7. This can quickly be done by changing the settings via the Control panel – please refer that link for details.

To change the file extension using Windows Explorer, click the file once, wait for a second or two and then click on it again. Only the first part of the file will be selected – refer image below.

Only the file name proper is selected when you click in Windows Explorer

But we need to modify the file extension, right? Thus, select that and change it to whatever you want.

Change the file extension in Windows 7 via Windows Explorer

Windows 7 might show a warning message (below) – ignore it and click the “OK” button.

Warning message displayed when you change the file extension in  Windows 7 operating system

Use DOS commands through the terminal window
Open a terminal window from “Programs” -> “Accessories” -> “Command Prompt“. Move to the folder that contains the file/s whose extension you want to change. Use the cd command to change directory. Type in the following command; you obviously need to substitute the file names (in the square brackets] with the one you have and the one you want.

ren [old file name] [new file name]

The DOS command for renaming a file is ren and with it you can give a new name to any file… not just a new extension. Too techie? Forget I ever told you about this and go with the Windows Explorer method described above.

How Do I Windows 7