1

I have a .bat that I use frequently enough that I feel it warrants adding it to my Shift+Right-Click context menu. I do have SOME experience with editing my context menus. I added an entry to my Shift+Right-Click to "Reboot to UEFI" and a "Kill All Not Responding Tasks" entry, so I am not a complete noob, but I do not know how I would go about adding this menu entry due to how this command works. My .bat file looks like this:

@echo off

for %%i in (*) do (

if not "%%~ni" == "organize" (

md "%%~ni" && move "%%~i" "%%~ni"

)

)

When I use this .bat file, I need to place it in the folder I need to use it in and when it has complete its task, I need to locate the .bat and delete it. What the .bat is doing is taking all files and placing them in their own folders with the folder being named whatever the file's name is. ie: abc.exe gets put in a folder titled "abc".The desired result would be akin to the Shift+Right-Click entry "Open Command Prompt Here" except it would be titled "Organize Files" and ONLY available when the Shift key is pressed when the Shift key is pressed when Right-Clicking, "Organize Files" is located at the very top of the context menu. If it is possible to achieve this when clicking on the parent folder (containing all the files) AS WELL as when in the parent folder (when inside the folder containing said files and clicking in a blank space within the parent folder), that would be ever the more awesome. Any help would be greatly appreciated! Thanks in advance everybody!!!

Note: I did search the site and found This but it isn't helping me quite enough. I am a bit confused on how I would make my reg key run this command for any folder that is passed through to cmd by the Shit+Right-Click menu, that is why I am posting.

1
  • This is something I was thinking of as I was going to sleep, I am glad we are like minded. I will try this. Thanks! Edit: Ok, so I just tried this and it works flawlessly. What I am going to do now is come up with a registry entry in the same vein as what I did with rebooting to UEFI, thank you for the input. I will mark your answer as solved or whatever the checkmark is titled. May 30 at 5:07

1 Answer 1

1

You can just place the .bat file somewhere, and add it to path. Then, when you want to organize a certain folder, just go into the folder (where all the files are located), click on the address bar, and type in the name of the batch file.

You must log in to answer this question.

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