Internal Command: Close Duplicate Tabs

I often end up with duplicate tabs in my workflow. Is it currently possible to perform the following using an internal command?

  • Close all duplicate tabs (leaving only the first instance of each tab).
  • Close the duplicate tabs of a particular tab (leaving the selected tab open).

If not, could these be added as possible values for the TABCLOSEALL argument? Thank you.


I would use this functionality to add these buttons to the folder tabs context menu.

This could be done with some scripting.
You'd need to define a few more things: acting only on current lister (provably)? Only on current pane? Based on the tab folder or tab name (which can be changed)?

There's a script for it here:

I have used @Leo 's DeDuplicate Tabs for quite some time.

It is simple and works quite well.
I use the stand alone clickable version.
I see @Jon has posted as I was typing.

Here's my copy of the working button.
Close Duplicate Tabs.dcf (2.8 KB)