Our regular reader Roberto has asked in the previous tutorial :
Hello, I love your site, follow daily
I wonder if it is possible to Cascading list of folders in right click context menu in Windows 7 ?
Thanks
(Used google translator, Pt to En)
Firstly, many many thanks to Roberto for being a regular reader of TheCustomizeWindows and leaving a nice idea.
As we said in that post, yes it is possible to add a cascading list of folders in the right click context menu. The process is, however has more similarity with the tutorial Cascading list of websites in right click context menu.
---
Under stand the following things:
- All the names in right click menu can be changed
- You can add as many as folder location you want
- You can change the icon of them as well
- You may create one menu named Favorites, one Works and so on
- The first run will take few milliseconds; from the second run it will be fraction of milliseconds as the prefetch cache will be primed
- It works on Windows 7 Desktop, inside the folders (Explorer) also
- There is no reason to think it will consume huge RAM, unless if you use huge sized icons
As usually, we need two things: a batch file to carry the job, that is to open the folders, a nice icon in *.ico format of 16 x 16 pixels size for each or link to other executable to share the icon (recommended) and a registry file to add it to right click menu.
First, as the things are quite complex and we want to keep a way to remove or add more folders to the list; we will create a folder named MyFolders (you can use any name, but have to change in the registry in next step) on your desktop.
We are giving the example of the above screenshot like menu:
Make a list which folders you want too add; otherwise you might mess it up.
Creating the batch files to open the desired folders
One batch file for each folder location. We have added 5 system determined user folder locations and one custom folder location named TheCustomizeWindows which is in another partition.
Open Notepad. Write the following things for opening system folders:
%SystemRoot%explorer.exe “C:Users%username%Documents”
For folders those are in different partition, you can use the full path:
%SystemRoot%explorer.exe “E:The Customize Windows”
Save the file as Documents.bat for the first example above and do not forget to change the file type from text to All files from drop down menu in Notepad before saving it. Obviously, you will save My office folder’s batch file with the name My office folder.bat.
You can name as you like; but if you call a rose a mouse; you may later get confused whether mouse smells nice or the rose. That is the significance of naming properly. Test the batch file by double clicking it. It should open the folder. Now create all the batch files in this way.
Place these all batch files in that MyFolders and place it in C: drive. You can place anywhere, but you need to change that in registry file too.
Note: You can use “%UserProfile%Documents” instead of the absolute path œC:Users%username%Documents. The main advantage is, you do not have to think in which partition your Windows 7 is installed.
Thanks for the input from PC2012 from deviantArt.
Creating the registry file
This will add the functionality to get working from right click context menu. Open Notepad, copy paste the following and modify as per your need:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOTDirectoryBackgroundshellMyFolders] “Icon”=”C:Windowsexplorer.exe” “MUIVerb”=”MyFolders” “SubCommands”=”Desktop;Documents;Pictures;Videos;Music;TheCustomizeWindows” [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellDesktop] @=”Desktop” “Icon”=”C:WindowsSystem32Narrator.exe” [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellDesktopcommand] @=”C:MyFoldersDesktop.bat” [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellDocuments] @=”Documents” “Icon”=”C:WindowsSystem32wlrmdr.exe” [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellDocumentscommand] @=”C:MyFoldersDocuments.bat” [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellPictures] @=”Pictures” “Icon”=”C:WindowsSystem32PhotoScreensaver.scr” [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellPicturescommand] @=”C:MyFoldersPictures.bat” [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellVideos] @=”Videos” “Icon”=”C:Program FilesWindows Media Playerwmpnscfg.exe” [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellVideoscommand] @=”C:MyFoldersVideos.bat” [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellMusic] @=”Music” “Icon”=”C:Program FilesWindows Media Playerwmplayer.exe” [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellMusiccommand] @=”C:MyFoldersMusic.bat” [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellTheCustomizeWindows] @=”TheCustomizeWindows” “Icon”=”C:MyFoldersfavicon.ico” [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellTheCustomizeWindowscommand] @=”C:MyFoldersTheCustomizeWindows.bat“
The red text is what you want to see as main menu; you can name as Work Folder for example.
Next the cyan text represents the path of icon of another program. Do not get confused. You can use the location like we have used for TheCustomizeWindows folder; please notice the last cyan colored text.
The greenish text is what you want to see in the list. Names must match.
Save the file as Add Folders.reg and do not forget to change the file type from text to All files from drop down menu in Notepad before saving it. Name does not matter here at all. You can save as you like.
Now, double click the reg file and accept the security warnings and you will see the option in right click context menu when clicked on a folder or any empty place inside folder or Windows 7 desktop.
You will get it as you want.
Updating or adding more entry:
- Create a new batch file for that folder
- Create a icon for that folder or find it in your Windows subfolder; system32 has lot of such programs.
- Put it to C:MyFolders
- Open the Add Folders.reg and right click it and open in Notepad; add the name of the folder separated by semicolon within the quotation mark; here after …;TheCustomizeWindows” ; if you add My Works, it would be: “SubCommands”=”…TheCustomizeWindows;My Works“
- Copy last two sets of HKEYs and paste it at the end. You will copy and modify this:
- Modify its name, location, icon etc and save the registry file; double click to run it. It will be added.
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellTheCustomizeWindows] @=”TheCustomizeWindows” “Icon”=” C:MyFoldersfavicon.ico ” [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellTheCustomizeWindowscommand] @=”C:MyFoldersTheCustomizeWindows.bat”
Removal:
Add a minus sign before the H starts after the third bracket; like [-HKEY_CLASSES…. to all where there is HKEY and save it (with some good name) as reg file and run it. It will break the association; so the option will disappear from right click context menu.
Obviously, you might delete the bat files manually too.
Downloads:
As usually all the required files are here for your download.
The rar file is password protected, type thecustomizewindows.com as the password.
Tagged With add folder and locations to cascading context menu optioon , how to add a cascading folder to right click menu , list subfolders right click , windows 7 cascading folders custom taskbar hkey
Thanks really nice but sorry for the trouble but when i try the .bat files the command promote opens and closes quickly with nothing happening and i think its supposed to open the folder right?
If the command and path, both are right (or matches) for your computer when logged in with proper administrative/user privileges (if applicable), it will open so.