Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What is the simplest way of changing a file extension (without messing around with folder view options)?

Oftentimes I have to quickly change the extension of a single file on a Windows PC. I don't like to turn on the option to show file extensions, change the extension, and then turn the option back off. If I forget to turn off the option, the client will not understand how his computer works; this method also involves a lot of clicking. What is the fastest way to change a file extension?

Update
For completness, here the fastest way I have figured out until now:

  • Right click in the folder while holding down the Shift key.
  • Select Open command window here from the menu.
  • Use dir to list the currrent file name with its extension.
  • Enter rename [filename].[oldExtension] [filename].[newExtension].
share|improve this question

3 Answers 3

up vote 5 down vote accepted

You could try cmdHere (Power Toys) and then using move filename.jpg filename.jpeg. Or you could Press F2 for rename (If it works with disabled extensions!).

But you should enable extensions anyway. As i would think it is a security risk to have them disabled. An attacker could send you an file like "Really Important Filename".exe With an standard icon included in the .exe making it look like an Word, Excel or Text Document. You might then click it unaware of the .exe file format. THIS is an EVIL feature of Windows.

share|improve this answer
    
Yes, I disliked it also at the time MS has begun to set this as the default. But now I live with it. However I don't talk about my computer. I talk about computers of my clients. Sometimes I have to do quickly change an extension of a file of one of their computers. And they absolutey don't like it, if I disable this feature. F2 does not work. –  hcl Feb 21 '11 at 15:59
    
@hcl I have googled it. I think there might be not too much you could do. There is an .exe which creates a Win+Y combo that you could use to toggle the view. But this is not what you want i guess. Anyway an USB-Stick with an autostart option and this .exe might do the trick. Take a look at the link techfuels.com/windows-vista/… it does not change the system it seems, therefore it might be worth to take a look at. Everyone i told why it is evil kept the extensions enabled. Maybe you should talk to your clients –  Darokthar Feb 21 '11 at 16:09
    
+1 Thanks for your suggestions. I hoped for a hidden operation, somthing with holding the control-key down or so. I assume I will use the command-version. Downloading an app or starting one from an usb-key is not an option. I will wait some time if someone unexpectedly will post a nice solution and if not I will accept your answer. Thanks. –  hcl Feb 21 '11 at 16:15
1  
No, sadly pressing Shift+F2 or holding Shift does not currently work. In fact pressing Shift+F2 is not even recognized as an attempt to rename (that hotkey is free for mapping) and holding it while selecting Rename from the context menu does nothing special. Microsoft’s insistence of hiding extensions to prevent the basest, stupidest of users from accidentally erasing it makes security people frown. –  Synetech Feb 21 '11 at 16:37
    
@hcl I dislike when Windows hides file extensions from you. As you should already know, a Windows executable can use any sort of icon, and this includes icons for documents. The file description and company name can be changed to make the executable look rather like a regular document. Since the .exe extension is hidden, the user will not notice that the so-called "document" is actually an executable that could infect his computer. –  Jonathan Reno Sep 10 '12 at 17:49

I would recommend using the command-prompt as well, but with either of two different methods.

    • Open a command-prompt (I like to set the shortcut in Start->Accessories to have a hotkey like Ctrl+Alt+P to make it quick and easy, though Start->Run->cmd.exe works just as well)
    • Type ren "
    • Drag-and-drop the file in question to the command-prompt window
    • type " " (there’s a space between the quotes)
    • Drag-and-drop the file again
    • Press Backspace and change the extension as desired
    • type "
    • Press Enter
    • Close command-prompt

It looks like a lot, but it is actually not and takes about three or so seconds to do (editing the extension is the most time consuming part).

  1. (supposed to be 2, markdown limitation)
    • Install a program like Kai Li’us CmdOpen (I prefer this to the older Microsoft PowerToys one because it supports elevated prompts and has the source available)
    • Open a command-prompt in the folder where the file in question is contained (right-click on the window where the file is located and press ‘A’ or select Open command prompt
    • Press Tab a few times until the desired filename is displayed
    • Press Space
    • Press Tab again until the filename is displayed again
    • Edit extension
    • Press Enter

This method is also pretty quick, but if there are a lot of files in the folder, using method one is faster.

share|improve this answer
    
+1 Yes, I have not thought about Drag/Drop. This makes it much easier. Nice... –  hcl Feb 21 '11 at 16:42

Go to folder options and uncheck the option 'hide file extensions'
Now all you have to do is select a file and press f2 and rename the file extension
You can always use command prompt if you are comfortable with it

share|improve this answer
    
the OP said he doesn't want to have to uncheck the options "Hide file extensions" –  Gabriel Mongeon Feb 21 '11 at 16:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.