Page 1 of 1

Drives remain in Mini Tree

Posted: 15 Jan 2014 21:17
by LittleBiG
Zombie tweak = 0. Drives stay in Mini tree even if they are not accessible anymore. Not too nice:

Re: Drives remain in Mini Tree

Posted: 16 Jan 2014 08:00
by admin
That's by design. For years. The idea: The availability of some drives is notoriously volatile (mapped drives, CD-ROM...). This should not affect the tree.

Re: Drives remain in Mini Tree

Posted: 16 Jan 2014 09:17
by LittleBiG
But years before we didn't use that many drives. We were happy if we had a pendrive. Now I have more than five in use and a portable hard drive. Additionally I have encrypted partitions which are mounted as a removable drives occasionally. Time has changed. I could do with an improvement here. Now my mini tree has 2 parts: folders I use and unmounted drives I don't.

Re: Drives remain in Mini Tree

Posted: 16 Jan 2014 14:40
by admin
Hmm, this will need deeper thinking. This feature is there for lots of years and nobody ever complained. I won't touch it now.

Re: Drives remain in Mini Tree

Posted: 10 Apr 2014 19:29
by LittleBiG
I have just received a confirmation, that I am right and this can be a problem for others too. A colleague who is fairly new to XY (and I help him with my knowledge to use XY in an optimal way) came to me with the question, how he could remove the obsolete removable drives from his mini tree. He couldn't understand why they were there, although the AllowZombies setting was off and he was sick and tired to do it manually by hiding.

Maybe other people also face with this problem, so I can give a possible solution. Create a new script file called ClearDrives.xys in your Script folder with this content:

Code: Select all

//CLEAR OBSOLETE DRIVES FROM THE MINI TREE
  //if the mini tree is on
  if (get("#489")) == 1 {
    $minidrives = "";
    //check each path to find drives
    foreach($minipath, get("Tree"), "|",, "") {
      if (strlen($minipath) == 3) {$minidrives = $minidrives . $minipath . "|"}
    }
    //select the mini tree drives which are not in use at the moment
    $minidrives = formatlist($minidrives,"ef","|","!".get("drives"));
    //remove them from the mini tree
    if ($minidrives != "") {
	  loadtree "$minidrives", 2; 
	  status "Cleared drives: " . replace($minidrives,"|"," ");
	}
	else
	{
	  status "Nothing to clear.";
	}
  }
ClearDrives.xys
Then modify the XY shortcut in order to run the scipt after every start:

Code: Select all

XYplorer.exe /script=ClearDrives

Re: Drives remain in Mini Tree

Posted: 10 Apr 2014 20:48
by Stef123
Excellent. :appl: Even a newbie like me could immediately run it, thanks to your complete instructions.

May I ask you a favor? Could you come up with a similar script (or point me towards one) that clears out my broken entries in recent folders? Unless there is an easier way of course, that I am not aware of.

I wouldn't mind if the whole recent list gets cleared. Actually, I am more concerned with the Hotlist - a great feature, love it - but it's cluttered with invalid entries. I wouldn't mind starting over every session with a blank list. Still better than all these warning signs. I know how to clear the list manually, but if there is an easy way to automate it, I'd prefer that, of course.

Re: Drives remain in Mini Tree

Posted: 10 Apr 2014 23:07
by LittleBiG
Stef123 wrote:May I ask you a favor? Could you come up with a similar script (or point me towards one) that clears out my broken entries in recent folders? Unless there is an easier way of course, that I am not aware of.
What I can offer you is here: http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=11458

Re: Drives remain in Mini Tree

Posted: 11 Apr 2014 09:30
by admin
OK, you softended my heart. I will extend the Zombie setting to drives.

Re: Drives remain in Mini Tree

Posted: 11 Apr 2014 10:14
by Stef123
Thank you.
Don't want to exploit your soft heart, but since you offered it yourself: Are those dual-pane parameters still on your radar? The work-arounds are not nearly as straightforward as LittleBig's ClearDrive. I think a lot of users would benefit from them:
http://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=11413

Re: Drives remain in Mini Tree

Posted: 11 Apr 2014 10:27
by admin
I added this already:

Code: Select all

    + New variables to return the unslashed path of each pane:
        echo <path 1>;    //pane 1
        echo <path 2>;    //pane 2   

Re: Drives remain in Mini Tree

Posted: 11 Apr 2014 11:43
by Stef123
Beats me how I could have overlooked those lines from Apr 4th
Thanks.