Remove Tab on Folder Delete?

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
Vocalpoint
Posts: 181
Joined: 06 Nov 2009 14:01

Remove Tab on Folder Delete?

Post by Vocalpoint »

All

Feel like I am missing an obvious setting here - but if I highlight any folder (or subfolder) in the main directory tree on the left of XYPlorer - a tab opens for that folder showing the files within the folder on the right pane of XY.

However - if I decide to delete the entire folder (and its files) on the tree (either to Recycle Bin) or permanently - the folder is vaporized but the tab relating to it remains on the right side and always has the annoying message of:
2022-11-01_15-48-39.png
Do this 20 times and suddenly I have 20 tabs (That point to nothing) that need to be manually closed.

Is there a setting to kill the tab when the folder it relates to is deleted?

Cheers

VP
To see the attached files, you need to log into the forum.
OS: Win 11 25H2 EDU x64 | XY: 28.30.1600 (x64)| Display: 3840x2160 @ 60hz | Scaling 175%

highend
Posts: 14992
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Remove Tab on Folder Delete?

Post by highend »

Afaik not.

You could either use a script for custom event action (Other Events - Switch tabs) but this still requires you to click on a different than the current tab (it doesn't need to be one which path doesn't exist anymore), use the script manually to cleanup all those tabs or... write e.g. an AHK script that takes care of cleaning up e.g. every two seconds...

Code: Select all

    $tabs    = get("tabs", <crlf>);
    $cntTabs = gettoken($tabs, "count", <crlf>);
    $tabID   = 1;
    foreach($tab, $tabs, <crlf>, "e") {
        if (exists($tab) != 2) {
            tab("close", 0, $tabID);
            $tabID -= 1;
        }
        $tabID += 1;
    }
One of my scripts helped you out? Please donate via Paypal

RalphM
Posts: 2116
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Remove Tab on Folder Delete?

Post by RalphM »

It seems like you're not using many tabs that should stay there.
How about you define a default tab, which is then used to open whatever folder you open from the tree.
Ralph :)
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Remove Tab on Folder Delete?

Post by LittleBiG »

Ages ago I asked for a CEA on delete (to be able to cancel the delete if the file or folder had to be protected based on an algorithm.) However, if you wanted to delete many files or folders, it could slow the deletion down significantly. But could help here anyway.

Vocalpoint
Posts: 181
Joined: 06 Nov 2009 14:01

Re: Remove Tab on Folder Delete?

Post by Vocalpoint »

All

Managed to make this about a 100 times better by changing the following:

Tabs and Panes->Tabs->Unchecked "Reuse Existing Tabs when changing the location"

and

General-Tree and List->Unchecked Select Parent of Deleted Folder.

This works and removes the dead folder tab.

RalphM - never had the "Default Tab" option checked on a specific folder tab - what does this do exactly?

Cheers

VP
OS: Win 11 25H2 EDU x64 | XY: 28.30.1600 (x64)| Display: 3840x2160 @ 60hz | Scaling 175%

RalphM
Posts: 2116
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Remove Tab on Folder Delete?

Post by RalphM »

Default tab would be used for all your clicks in the tree, unless a tab for that location exists already.
However you would either need to set the "Select parent of deleted folder" back on or live with the "Location not available" message until you select the next folder in the tree.
Ralph :)
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)

Post Reply