Context menu handler for folder background

Would you like Bulk Rename Utility to offer new functionality? Post your comments here!

Context menu handler for folder background

Postby mica » Tue Sep 06, 2016 7:34 pm

It would be nice if we had a context menu item for when the clicking in the background of a folder. To get this functionality, you'd add it to:
Code: Select all
HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers

To my mind, this makes more sense than having the icon appear when selecting a file, and ought to replace that function altogether. But barring that, please at least include it.
mica
 
Posts: 2
Joined: Tue Sep 06, 2016 7:16 pm

Re: Context menu handler for folder background

Postby therube » Thu Sep 08, 2016 12:52 am

clicking in the background of a folder

I'm not understanding what you're meaning by that (or in general, overall with your statement)?
therube
 
Posts: 346
Joined: Mon Jan 18, 2016 6:23 pm

Re: Context menu handler for folder background

Postby FileMangler » Thu Sep 08, 2016 8:24 am

I think mica refers to calling up BRU via contextmenu in the Windows file system.
Instead of right-clicking on a selected folder, you can right-click while sitting in the folder where the renaming should take place.
FileMangler
 
Posts: 9
Joined: Sun Aug 07, 2016 11:19 pm

Re: Context menu handler for folder background

Postby therube » Thu Sep 08, 2016 8:54 pm

Oh.
Well you can approximate something like that.

Set up a batch file, call it "BRU_parent.bat":

Code: Select all
"C:\BRU\Bulk Rename Utility.exe"    "%~dp1"

(Adjust the path to BRU as necessary.
And then place the batch file somewhere in your path, %PATH%.)


Then create a link to that, in your 'SendTo' menu, call it, perhaps BURP.
When you're within a folder where you want to rename the files, right-click a file, SendTo -> BURP.


Should open BRU with that file's parent directory (rather then the file name) as the source.
therube
 
Posts: 346
Joined: Mon Jan 18, 2016 6:23 pm

Re: Context menu handler for folder background

Postby mica » Tue Sep 13, 2016 1:16 am

Here are the 3 places where BRU appears on the context menu w/ their associated registry keys:

When right-clicking on a folder:
Code: Select all
HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\BRUMenuHandler


When right-clicking on a drive:
Code: Select all
HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\BRUMenuHandler


When right-clicking on a file:
Code: Select all
HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\BRUMenuHandler


I'm hoping you'll add the following (possibly in place of the last):

When right-clicking in a folder background (the empty white space in a folder):
Code: Select all
HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers


I tried to get this working with the {5D924130-4CB1-11DB-B0DE-0800200C9A66} value that the other keys use, but it's not working here - possibly because it's using (or, I assume it's using) the %1 variable. This variable is empty when called from a folder background. If you use %V instead, it passes the file/folder path, same as %1 – unless %1 is empty, in which case it passes the working directory. See: http://superuser.com/a/473602/31408

Here's a working example (for a .reg file):
Code: Select all
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\Bulk Rename Here]
"Icon"="\"C:\\Program Files\\Bulk Rename Utility\\Bulk Rename Utility.exe\""

[HKEY_CLASSES_ROOT\Directory\Background\shell\Bulk Rename Here\Command]
@="\"C:\\Program Files\\Bulk Rename Utility\\Bulk Rename Utility.exe\" \"%V\""

This same command would work at any of the other keys as well.
mica
 
Posts: 2
Joined: Tue Sep 06, 2016 7:16 pm


Return to Suggestions


cron