path-part syntax

Discussion related to "Everything" 1.5 Alpha.
Post Reply
anmac1789
Posts: 668
Joined: Mon Aug 24, 2020 1:16 pm

path-part syntax

Post by anmac1789 »

in path-part:"parent folder\subfolderA\subfolderB\subfolderC" How can I display the 3 subfolders A, B and C in addition to the parent folder?
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: path-part syntax

Post by void »

Something like the following?:

Code: Select all

addcolumn:column1 column1:=PATHCOMBINE(BASENAME(PATHPART(PATHPART(PATHPART($fullpath:)))),PATHCOMBINE(BASENAME(PATHPART(PATHPART($fullpath:))),PATHCOMBINE(BASENAME(PATHPART($fullpath:)),BASENAME($fullpath:))))
path-part in custom columns?
anmac1789
Posts: 668
Joined: Mon Aug 24, 2020 1:16 pm

Re: path-part syntax

Post by anmac1789 »

that's really long...

I can do:

path-part:"desired"|folders:"desired"

in this instance it would give:
subfolders and files under desired\ folder together with the desired\ parent folder. Is there a better way ?
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: path-part syntax

Post by void »

How can I display the 3 subfolders A, B and C in addition to the parent folder?
Ah, did you mean search instead of display?

Do you want to also search subfolders for the last subfolderC?



Please try the following search:

"parent folder\*" | "parent folder\subfolderA\*" | "parent folder\subfolderA\subfolderB\*" | "parent folder\subfolderA\subfolderB\subfolderC\*"

This will show files/folders directly in
"parent folder" OR "parent folder\subfolderA" "parent folder\subfolderA\subfolderB" OR "parent folder\subfolderA\subfolderB\subfolderC"



Another option would be parent:

parent:"c:\path\to\parent folder" | parent:"c:\path\to\parent folder\subfolderA" | parent:"c:\path\to\parent folder\subfolderA\subfolderB" | parent:"c:\path\to\parent folder\subfolderA\subfolderB\subfolderC"

Unfortunately, you need to specify the absolute path with parent.



If you wanted to include subfolders/files in the last subfolderC, please try the following search:

"parent folder\*" | "parent folder\subfolderA\*" | "parent folder\subfolderA\subfolderB\*" | "parent folder\subfolderA\subfolderB\subfolderC\"



* in Everything 1.5 will match any character except \ any number of times.
anmac1789
Posts: 668
Joined: Mon Aug 24, 2020 1:16 pm

Re: path-part syntax

Post by anmac1789 »

What if there are a alot of folders and subfolders? How can I implement this into a custom column? For example, add the last 3 "\" paths in a custom column ?

There has to be a better way than combining paths several times. Instead could it be controlled by the user? For example in a custom column, take the full path - "\" from the first 5 slashes from the left ?

Example:

C:\users\void\folder\quick\brown\fox

in a custom column place, subtract the first 3 slashes from the left so that whats leftover is placed in column1:
quick\brown\fox ?
Post Reply