Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: directory shell context menu item to rename file extensions

14 May 2014   #1
slunt70

Windows 7 Pro x64
 
 
directory shell context menu item to rename file extensions

I have used the following registry mod successfully in win XP to add a right click option on a folder to rename m4a (AAC files) to m4b (bookmarked AAC files).

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\m4b.m4a]
@="Rename m4a to m4b extensions"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\m4b.m4a\command]
@="cmd.exe /c \"rename *.m4a *.m4b\""

Unfortunately, it is not working in Windows 7 32 or 64 bit. If I open a command prompt in the folder, the rename command works as advertised, but for some reason it won't execute properly from the context menu based on the registry key.


My System SpecsSystem Spec
.
15 May 2014   #2
MilesAhead

Windows 7 32 bit
 
 

I would change it to simply "cmd.exe /k" to see what directory is the default then the prompt opens.
My System SpecsSystem Spec
15 May 2014   #3
slunt70

Windows 7 Pro x64
 
 

Update:

Running the reg command without the terminate option (/c) showed a command prompt at the %windir%\system32 folder. So the command was executing, just in the wrong folder. Looking at the open-command-window-here reg setting, I saw that it uses the selected directory with the pushd "%V".
Apparently XP runs cmd.exe from the selected directory by default.

So I chained that command with the rename and viola it's working!

Here's the finished reg entry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\m4b.m4a]
@="Rename m4a to m4b extensions"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\m4b.m4a\command]
@="cmd.exe /s /c pushd \"%V\" && rename *.m4a *.m4b"


MilesAhead had posted to this forum with the correct diagnostic before I had a chance to post the fix. Thanks for the help. It would have got me to the same point.
My System SpecsSystem Spec
.

15 May 2014   #4
MilesAhead

Windows 7 32 bit
 
 

Thanks for posting how you resolved it. That "pushd trick" looks generally useful. I'll add it to my tips file.
My System SpecsSystem Spec
Reply

 directory shell context menu item to rename file extensions




Thread Tools




Similar help and support threads
Thread Forum
Show - Hide Known File Extensions - Add to Context Menu
Add "Show/Hide Known File Extensions" to Context Menu in Vista, Windows 7, and Windows 8 A file name extension is a set of characters added to the end of a file name that identifies the file type or format that determines what default program should open it. This will show you how to add or...
Tutorials
How to add a button to the context menu to copy a file to a directory
Hi, I use a few different files on a very regular basis. As an example, I have an Excel file that starts out as a template which I then modify to fit the situation. I start by navigating to the location of the "template" (via a shortcut to make it quicker), copying the file and then navigating...
General Discussion
Item name in context menu changes itself
I'd like to change the name of "Screen resolution" item in right click menu and it works... by the time. I've been searching for this name whole C: partition and in the registry, and I found it there: 28\5DB2B7D1], more specifically in the @C:\Windows\System32\display.dll,-4 file as the registry...
Customization
Add or remove icons from shell extensions in right click menu
Hi, I was trying 2 days in a row to add some icons in the right click context menu. I was able to add some of them, for example next to "print" or "play". But I ouldn't find any way to add icons next to shell extensions, for example "7-zip". Is this any way via registry or via any other...
Customization
What's this shell menu item?
Hello, I got silently added to all shell context menus these items which belong to unknown to me software. How do I find the sw and remove it from my shell menus (I don't want anything but Winrar in my shell menus): http://img41.imageshack.us/img41/9813/14102011155337.png
Customization
Persistant context menu item
Hello, I found another bug in Windows Seven. I feel like I have more bugs with 7057 and 7068 than I had with 7000 and earlier. I will probably solve this problem by rebooting, but I never reboot so this is annoying. If I right click and choose an item in a context menu, the item stays,...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:30.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App