GP SoftwareTwitter
Opus FAQsManualCommandsObjects

No duplicate tabs?

Hi, I is there a way in a lister to put it in a mode where a duplicate tab cannot be opened? I mean if you try to open a folder that already has a tab open it will just go to it. Thanks

This will work... Go C:\ NEWTAB=findexisting

Thanks I guess that is when I am creating a button? How would I use this on folders that I am clicking on, or is that even possible. Thanks again!

Change the command in Settings > Filetypes > All Folders > Events > Left Double Click to Go newtab=findexisting

Thanks, works great, very useful and helpful! Directory Opus and its community members like your self don't stop giving, GREAT! Thanks again!!!

This works great, but I see that I was not thorough enough on understanding how i wind up with duplicate tabs. I see that I can still create a duplicate if I go up a level on a folder, and some other ways. I am wondering if there are any known strategies with Opus to absolutely not allow for duplicate tabs. Thanks

You could probably do it using a script in Opus 11.

I'm not sure how it would work if you think it through, though.

Say you've got two tabs open:

C:\Windows
C:\Windows\System32

If the second tab is active and you want to go to C:, you'd naturally click the Up button twice. But the first time you click, both tabs will be in C:\Windows, so what should happen then?

You could close one of the tabs, so you're left with just C:\Windows, and then the second Up click leaves you with just one tab in C:\ and you've lost the C:\Windows tab entirely, just by passing through the folder it happened to be in.

Or you could activate the tab that's already in C:\Windows and leave the other one in C:\Windows\System32, and the second Up click takes the first tab to C:, leaving you with tabs for C:\ and C:\Windows\System32. But then you tried to navigate one tab to C:\ and ended up navigating another tab to it instead, preserving the tab you wanted to change and changing the one you didn't want to change.

Maybe the script could do something more complex, but then it might be difficult to understand what it was going to do at any moment...

Thanks I will start to look at that. Tell would an idea of limited number of tabs have to take the same shape. Like lets say max tabs at one time can't be greater then 7?

It's possible I guess, but I don't know how best to decide which tabs to keep.

If it was me I'd look at why so many unwanted tabs end up being opened rather than try to deal with them after they're open. I only open a new tab when I really want one, and close it as soon as I'm finished using it. (Still end up with the odd duplicate or unwanted tab, but it's rare enough that I just close them or the window they're in as and when.)

I see what you mean, and that in a way was my thinking, Sometimes when work revolves around this computer or a few users it is hard to know what to keep open. I think because Opus is usually handling my problems so gracefully, I am relying on that instead of being more diligent like you said. I see and understand there is more to a strategy like I am asking for. Thanks you so for the great help always!

That's why an additional feature requested here [url][Feature Request] Close duplicate tabs] would be a great addition!
That's how I manage duplicate tabs in another file manager:
Scenario 1 (most frequent)
I usually navigate to a folder I need from one of ~10 favorite folders, which at first I open with WinKey+# via Autohotkey
Authotkey passes a custom command to the file manager, which does two things:

  1. Opens my favorite folder
  2. Closes all duplicate tabs
    This is enough for like 90% of my duplicate tab reduction, it also happens automatically.

Scenario 2 (less frequent)
Sometimes I'd also navigate to a folder by first creating a duplicate tab with Ctrl+T and then navigate to the destination.
Now, if I end up with duplicate tabs, I either activate "Close all duplicate tabs" function via a toolbar button or right click context menu or simply activate Scenario 1 by opening a favorite tab with a Winkey+# shortcut (and close it right away if I don't need)

Given that there is new Opus 12 Beta going on, I'd love to see this feature of closing duplicate tabs (proposed ~4 years ago by jpu) finally implemented, so I'd like to bump his request.
It's a sore point of any multi-tab file managers that you'd get with a few stray duplicate tabs that just take precious space, so it'd be nice to have a way to close them.
I would also like to be able to pass this function via a command line so that when I open my favorite folders with Autohotkey with e.g. WinKey+2 I could also pass a TABCLOSEDUPLICATES function — this way most of the time the duplicate tabs would be closed semi-automatically during the normal course of my work as I keep opening tabs with favorite shortcuts.

Below is a copy of the original proposal from [url][Feature Request] Close duplicate tabs]
Argument:
TABCLOSEDUPLICATES /O

Possible values:
(no value) Close any duplicate file tabs, leaving only original
Example: Go TABCLOSEDUPLICATES

left Close duplicate folder tabs in the left (or top) file display, irrespective of whether it is the source or not.

right Close duplicate folder tabs in the right (or bottom) file display, irrespective of whether it is the source or not.

dest Close duplicate folder tabs in the destination file display

existinglister Close duplicate folder tabs in current lister

alllisters Close duplicate folder tabs in all listers

That's a decent idea. We had that topic once before, & Avi provided some external solution, which worked quite well. But it would be handy, to have it as an internal Opus command, i agree.

[url]Tablist management]

By the way, it even would be better to have some "auto close" switch, which would prevent duplicates in the first place.

Maybe this helps a bit?
Event: CloseTabSiblings (autoclose equal tabs in tab-row): [Event: CloseTabSiblings (autoclose equal tabs in tab-row))

A script command or add-in could easily do that now, and work however you wanted (e.g. just in the current window, or half of the window, or across all windows and listers).

It can also be done automatically as soon as you change folders or similar, as im TBone's CloseTabSiblings script that already exists: [Event: CloseTabSiblings (autoclose equal tabs in tab-row))

Note that your hotkey example could use NEWTAB=findexisting to avoid the situation entirely, so there's no mess to clean up.

(I've merged the two threads, since they were the same thing, to avoid more duplication.)

Thank you, that's a nice script indeed! Slightly missing what I need (I basically need tab protection when I open a new tab with Ctrl+Tab to be temporary, not permanent as it currently is possible with modifiers), left a question there, hopefully someone would be able to clarify that.

Also, would you please add "duplicate" to that post title so it can be found easily? I wouldn't think of using "equal" or even "sibling" to search for this feature.

Hm, is it not possible to edit your own post? There is a typo, shortcut is Ctrl+T, not +Tab

@Note that your hotkey example could use NEWTAB=findexisting to avoid the situation entirely, so there's no mess to clean up
If that's about assigning this to "double click" then I wouldn't want to jump to another tab just because I'm temporarily passing the same path that is already open in another tab.

If you mean another hotkey, then I'm not sure how it'd work. In general, I do need Ctrl+T to be able to open duplicate tab so that I know where I'm navigating from (=as current tab) to easier reach my destination.