Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to turn off the file extension rename dialog in Windows 7?

The one that says

Rename: If you change a filename extension, the file might become unstable. Are you sure you want to change it?

share|improve this question
If, like me, you often get this warning when creating a file of a certain type (ie. creating a new "Text Document" and renaming) then you could add the desired type to the "New" context menu instead. – w3dk Nov 1 '13 at 11:31
up vote 7 down vote accepted

It's possible with an AutoHotkey script:

While, 1
 WinWait, Rename ahk_class #32770
 ControlClick, Button1

Install AutoHotkey, save the code above in a file with the .ahk extension and launch the script. It will wait for the Rename window to appear. When it does, it automatically "clicks" on the Yes button (identified here with "Button1").

If you don't want to install AutoHotkey, here is a compiled version of the same script. Run the executable and watch it do its magic :-) .

Note it does not really answer the question, as the question still appears. But it's automated so you'll not be bothered by it anymore.

share|improve this answer
+1 for an AHK solution :) – Phoshi Nov 8 '09 at 21:24
I tried this, but it still takes several seconds for the script to respond and "click" yes. Is there some way to alleviate this? – Cecil Has a Name Nov 27 '09 at 21:42
this script presumes the window is the one it is expecting, not some other error or prompt. AFAIK, one can query for the existence of the proper window (such as via title) prior to clicking. – horatio Mar 16 '12 at 19:57
This is a workaround. Is there no other way? Seeing the extensions and change them. I'm a SuperUser and know what I'm doing... ;-) – FiveO Oct 24 '13 at 7:12
This class #32770 is very common for many types of windows (try search for it), so this script will do something with many types of windows titled "Rename". That is, you might be getting more help than you bargained for :) – Evgeni Sergeev May 27 '15 at 0:56

In response to a comment about the accepted answer, I also found the AHK script to be quite slow. This modification seems to make it faster:

While, 1
 WinWaitActive, Renommer ahk_class #32770
 send o

You'll notice I'm using windows in french. For english use:

While, 1
 WinWaitActive, Rename ahk_class #32770
 send y

For windows in portuguese (at least the pt-BR version), use:

While, 1
 WinWaitActive, Renomear ahk_class #32770
 send s
share|improve this answer
Brilliant. This works ALLOT faster than the accepted answer! Like 0.1s vs 0.5s probably – Jonny Nov 25 '14 at 14:27

It is very much possible, with the right tools, patience, and nice disassembler and some luck you can disable it.

However, it is not as simple as changing a registry key.

Here is an example of someone disabling the "delay" when you try to delete a file that is in use.
I just tried to poke around and didn't find anything useful.

I think a better solution than RtvReco is for someone to create a menu option to the context menu that says like "Rename2" and pops up a messagebox prompting for the new filename and uses Windows API to rename it.....actually as I did this idea as I typed this see this link:

Considering I made it in the course of about 30 minutes, it has no features outside of renaming and may work or may not work. Feel free to fork the code and do whatever you want to your hearts content (namely error checking...). I tried it in Windows 7 x64 and I was able to rename a file (not a folder, yet?).

share|improve this answer
Actually, I incorporated the NoDeleteDelay into my all-purpose Explorer hack a few years ago. It looks like adding a Rename no-prompt to it is next on the list. :-) – Synetech Mar 16 '12 at 18:53
@Synetech: some more information about your "all-purpose Explorer hack" would be much appreciated. – Coxy May 21 '12 at 5:34
@Coxy, it’s just a program that patches explorer.exe to fix/improve/delete a bunch of things that annoy me about the default one. – Synetech May 21 '12 at 14:01
@Synetech: oh yes, I understood that but I was wondering whether you had a github/codeplex/geocities page where I could take a look and fix my own explorer in the same way. – Coxy May 22 '12 at 0:08
Yes, obviously things can go wrong if you patch files willy-nilly, and obviously it has to be re-applied after updates. As for a different file manager, I have yet to use one that I like over Explorer; they all tend to be too cluttered and overloaded. Besides, the rename prompt is the only annoying (yet fixable, albeit through force) thing about Explorer. – Synetech May 22 '12 at 14:28

You cannot disable the file extension warning message. It’s design in such a way to ensure the user’s safety from modifying the files accidentally.


Microsoft Communnity Answer

share|improve this answer
A superuser knows what he's doing (hopefully) - I never renamed a file extension "accidentally". And if so - I don't think Windows will throw a bluescreen right after the accidentally rename... – FiveO Jul 2 '14 at 13:54
I totally agree with SU community but this site is a world wide reference and some people, less tech-savy than some over here might try to rename and mess up the system. Nevertheless, this is a Microsoft limitation so at that point, techy or not, it is what it is. (As per the source of course) – r0ca Jul 2 '14 at 14:10

you can't, however, all is not lost.

you can use RtvReco to automatically close the warning as soon as it appears. this nifty little tool is designed to automate many aspects of Windows, by pressing buttons in annoying dialog boxes, choosing menu items, maximising, and minimising windows for you.

... or use a decent file mananger instead of Windows Explorer (e.g. Total Commander).

both programs are shareware, try before you buy.

i am aware of this registry hack, however, it does not work for me with Windows 7


set the value of ConsentPromptBehaviorAdmin to zero (0) and Reboot.

p.s.: of course there are free alternatives to Total Commander, it just so happens to be my file manager of choice.

share|improve this answer
I am under the belief that just disables UAC, can someone else verify/deny? – Nathan Adams Nov 8 '09 at 19:20
yep, but i found this in a thread at MSDN as a possible solution to the very same annoyance, but it doesn't work. – Molly7244 Nov 8 '09 at 19:39

Here is the code I used to solve the issue in AutoIT script. The only issue is that is keeps running and hogs some resources. Unless yall have a better idea to fix the script. :-)

While 1
  if WinActive("Rename","") Then
share|improve this answer

As we have files that when downloaded automatically has the date and time added as the extension. So I have been looking for a solution and found one.

Download a program called Free Commander. They have a portable version that can be installed on a USB thumb drive if needed.

This program allows you to select multiple files as in my case, and renames the extension without asking are you sure.

share|improve this answer

Rather than download an app, why not just use the 'ren *.aa *.bb' command in cmd (command prompt)?

share|improve this answer
The command prompt in Windows 7 isn't DOS. – Michael Frank May 2 '14 at 7:31
It isn't DOS, but this answer is more helpful than the others. – NateS Oct 11 '14 at 9:11

I really don't think this is possible without using a) command prompt (hassle unless you're used to it) 2) some kind of third party work-around, either a file manager or something that deals with the prompt so you don't have to. Personally I use PTFB (Push the Freakin' Button); pretty low on resources and very fast. Not exactly cheap, but a handy thing to have for other stuff.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .