1

i'm basically looking for a way to open folders from 3rd party apps (or at least just from "Everything") in a new tab and not a new window

In windows 11 File explorer there's an option to open folders in a new tab from context menu "Open in new tab", in "Everything" Search the context menu entries are pretty much the same as file explorer's (i'm talking about the original context menu you see when you click show more options), except for the "Open in new tab" which is not present the "Everything" context menu, which led me to wonder if it was possible to bring that entry into the context menu in "Everything" as well

i tried the following:

my knowledge in the area is very limited but i did some digging around and found the registry entry for "open in new tab" is "Computer\HKEY_CLASSES_ROOT\Folder\shell\opennewtab" it had a key called "OnlyInBrowserWindow" i assumed that this key meant that the context menu entry would only show in file browser so i thought "open in new tab" would show in other context menus if i deleted this key, but unfortunately that didn't do the trick and i couldn't take this idea any further..

i'm currently using a quick and dirty AHK script to open folders from Everything then copy their address and paste it in a new tab in the main file explorer window that i'm using, it's quite ugly and not very stable... if anyone knows a command line that could open folders in a new tab that could make things a lot easier for me

Any help is appreciated, and thank you in advance

Kareem
  • 155

1 Answers1

1

My, admittedly also clunky solution is a modified version of this script win-e.ahk

I added some logic to check if there are agruments, and if there are, to open the folder after opening explorer. It does work, but I wouldn't call it elegant.

The Script

Save this as C:\path\to\win-e-everything.ahk (change the path)

#SingleInstance, Force
SendMode Input
SetWorkingDir, %A_ScriptDir%

WinGet, ids, List, ahk_class CabinetWClass if (ids != 0){ Loop, %ids% { this_id := ids%A_Index% WinActivate, ahk_id %this_id% WinWaitActive, ahk_id %this_id%,, 2 active := WinActive(ahk_class CabinetWClass) if (active != 0) { send, ^t ; if there are arguments, Ctrl+l and the enter the arguemtn Sleep, 200 if (%0% != 0) { send, ^l send, %1% send, {enter} } break } } } else { Run, % "explorer" }

Telling Everything to use it:

Options -> Context Menu -> Open Path:
$exec("C:\path\to\win-e-everything.ahk" $pathpart("%1"))

Options -> Context Menu -> Open (Folders):
$exec("C:\path\to\win-e-everything.ahk" "%1")

EDIT: if you have issues, try increasing the length of the sleep. (where it says Sleep, 200)