parents: with a Folder Path is relative to the basename of the Path

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
therube
Posts: 4985
Joined: Thu Sep 03, 2009 6:48 pm

parents: with a Folder Path is relative to the basename of the Path

Post by therube »

Just noting...

parents: with an Indexed Folder Path, acts relative to the basename of the Path

so if you set up an Indexed Folder of:
C:\TMP\BRU\9000\

a parents:2 would find files/directories relative to the basename of the folder path,
so relative to the \9000\ directory,
so things like; \9000\DIR1\ & \9000\DIR2\ & \9000\abc.txt.
void
Developer
Posts: 16773
Joined: Fri Oct 16, 2009 11:31 pm

Re: parents: with a Folder Path is relative to the basename of the Path

Post by void »

Internally, root paths can contain \

C:\TMP\BRU\9000 is the root in this case and has a depth of 0

depth: will match the internal folder depth, not the number of backslashes (\)



The following search will show the number of backslashes:

add-column:a a-label:"Depth" a:=LEN($fullpath:)-LEN(SUBSTITUTE($fullpath:,"\",""))



LEN($fullpath:)-LEN(SUBSTITUTE($fullpath:,"\",""))==4

will match:

C:\TMP\BRU\9000\DIR1

Weird things will happen with \\server\share as \\server should be a root.
void
Developer
Posts: 16773
Joined: Fri Oct 16, 2009 11:31 pm

Re: parents: with a Folder Path is relative to the basename of the Path

Post by void »

If the correct depth count is really important:

Index all of C:

Add the following exclude folder filter:

regex:^(?!c:$|c:\\TMP$|c:\\TMP\\BRU$|c:\\TMP\\BRU\\9000($|\\))

Add the following exclude file filter:

regex:^(?!c:\\TMP\\BRU\\9000($|\\))



Only files/folders under c:\\TMP\\BRU\\9000 are indexed.
The C:, C:\TMP, C:\TMP\BRU folders are also included with no subfolders or files.
therube
Posts: 4985
Joined: Thu Sep 03, 2009 6:48 pm

Re: parents: with a Folder Path is relative to the basename of the Path

Post by therube »

If the depth count is really important:
parents: (aka depth:) is important, as a feature.

The fact that an indexed folder acts "differently" - no.
Just noting...
therube
Posts: 4985
Joined: Thu Sep 03, 2009 6:48 pm

Re: parents: with a Folder Path is relative to the basename of the Path

Post by therube »

C:\TMP\BRU\9000 is the root in this case and has a depth of 0

depth: will match the internal folder depth, not the number of backslashes (\)
Ah, &
root:
even shows that.
Likewise a mapped drive or SUBST would behave similarly.
Post Reply