Page 1 of 1

Color Filters: Showing Mount Folders That Actually Have Mounted Drives

Posted: 07 Jul 2021 14:14
by Jerry
I have a folder called DRIVES under which I have different subfolders that I use to mount external drives. At any time, only a few subfolders actually have external drives mounted under them. Is there a color filter expression that can indicate which of these subfolders actually have mounted drives? Or, is there any other way in XYplorer to see this?

Re: Color Filters: Showing Mount Folders That Actually Have Mounted Drives

Posted: 07 Jul 2021 14:24
by highend
There is even a default color filter for that...

attr:junction

Re: Color Filters: Showing Mount Folders That Actually Have Mounted Drives

Posted: 07 Jul 2021 14:36
by Jerry
highend wrote: ↑07 Jul 2021 14:24 There is even a default color filter for that...
attr:junction
Ah, I forgot to mention that I am using that filter already but it does not distinguish between mount points with currently mounted drives and those with placeholders. For example, in folders that have been mount points previously, but not currently, XYplorer reports:

The system cannot find the path specified.
Volume(6f9b....)


I want a color filter that will not mark those folders, only the ones under which drives are currently mounted and accessible.

Re: Color Filters: Showing Mount Folders That Actually Have Mounted Drives

Posted: 07 Jul 2021 14:47
by admin
What do you get here in either case?

Code: Select all

exist "<path to folder...>";

Re: Color Filters: Showing Mount Folders That Actually Have Mounted Drives

Posted: 07 Jul 2021 14:56
by highend
attr:junction AND prop:#HardLinks:1
or eventually
attr:junction AND prop:#HardLinks:>=1

Because for a non available mount, #HardLinks is "The system cannot find the path specified."

Re: Color Filters: Showing Mount Folders That Actually Have Mounted Drives

Posted: 07 Jul 2021 15:08
by Jerry
admin wrote: ↑07 Jul 2021 14:47 What do you get here in either case?

Code: Select all

exist "<path to folder...>";
So, there are 2 subfolders, MUSIC 7,8-BK and MUSIC 3,4-BK. Only the first subfolder has an external drive currently mounted under it. For that, exist reports:
  • Path: U:\DRIVES\MUSIC 7,8-BK
    Real Path: U:\DRIVES\MUSIC 7,8-BK
    ExistFile: False
    ExistPath: True
    ExistFolder: True
    ExistItemFF: True
    ExistPathFF: True
    ExistPathOrFile: True
    ExistPathOrFileShell: True
    ExistIcon: True
    IsNetworkLocation: False
    GetDriveType: 3 (DRIVE_FIXED)
    GetItemType: 2
    GetFileAttributes: 0x411 (1041)
    Owner: EARTH\Jerry
    This path available in Tree: True
    Current node available in Tree: True
    Watchable: True
    FilenamesCaseSensitive: False

    Junction Target 0: Volume{e34f74e0-a50a-4545-a1c7-33fe8ff42e8c}\
    Junction Target 1: U:\DRIVES\MUSIC 7,8-BK
    Junction Target 2: U:\DRIVES\MUSIC 7,8-BK
    IsMountPointVolume: True
    MountPoint: U:\DRIVES\MUSIC 7,8-BK
For the subfolder without a currently mounted drive, exist reports:
  • Path: U:\DRIVES\MUSIC 3,4-BK
    Real Path: U:\DRIVES\MUSIC 3,4-BK
    ExistFile: False
    ExistPath: True
    ExistFolder: True
    ExistItemFF: True
    ExistPathFF: False
    ExistPathOrFile: True
    ExistPathOrFileShell: True
    ExistIcon: True
    IsNetworkLocation: False
    GetDriveType: 3 (DRIVE_FIXED)
    GetItemType: 2
    GetFileAttributes: 0x411 (1041)
    Owner: EARTH\Jerry
    This path available in Tree: True
    Current node available in Tree: True
    Watchable: True
    FilenamesCaseSensitive: False

    Junction Target 0: Volume{fac33afa-2e31-4a33-8638-120593920e9f}\
    Junction Target 1: U:\DRIVES\MUSIC 3,4-BK
    Junction Target 2: U:\DRIVES\MUSIC 3,4-BK
    IsMountPointVolume: True
    MountPoint: U:\DRIVES\MUSIC 3,4-BK

Re: Color Filters: Showing Mount Folders That Actually Have Mounted Drives

Posted: 07 Jul 2021 15:09
by Jerry
highend wrote: ↑07 Jul 2021 14:56 attr:junction AND prop:#HardLinks:>=1
This works! Thanks!

Re: Color Filters: Showing Mount Folders That Actually Have Mounted Drives

Posted: 07 Jul 2021 15:36
by admin
ExistPathFF seems to be the only difference!

I'm glad that highend's idea works. :)