parent path part ?

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

parent path part ?

Post by anmac1789 »

How do I use path-part together with parent:, exact: or ancestor: ?
void
Developer
Posts: 16897
Joined: Fri Oct 16, 2009 11:31 pm

Re: parent path part ?

Post by void »

Please try parentpath:

For example:

exact:parentpath:c:\windows
will match C:\Windows\system32\shell32.dll

parentpath:



Please consider wildcards:

To find files/folders directly in c:\windows, search for:
c:\windows\*

To find files/folders in c:\windows one folder deep, search for:
c:\windows\*\*

To find files/folders in c:\windows one or more folders deep, search for:
c:\windows\*\**

Wildcards



Parent and ancestor will match files/folders directly in the specified folder.
It sounds like you are trying to avoid this.

Consider combining ancestor and !parent: to avoid direct children.

For example:
ancestor:c:\windows !parent:c:\windows
(same as c:\windows\*\** )
anmac1789
Posts: 673
Joined: Mon Aug 24, 2020 1:16 pm

Re: parent path part ?

Post by anmac1789 »

I am only corned with the part path i define and only one level deep
anmac1789
Posts: 673
Joined: Mon Aug 24, 2020 1:16 pm

Re: parent path part ?

Post by anmac1789 »

void wrote: Fri Mar 10, 2023 3:53 am Please try parentpath:

For example:

exact:parentpath:c:\windows
will match C:\Windows\system32\shell32.dll

parentpath:



Please consider wildcards:

To find files/folders directly in c:\windows, search for:
c:\windows\*

To find files/folders in c:\windows one folder deep, search for:
c:\windows\*\*

To find files/folders in c:\windows one or more folders deep, search for:
c:\windows\*\**

Wildcards



Parent and ancestor will match files/folders directly in the specified folder.
It sounds like you are trying to avoid this.

Consider combining ancestor and !parent: to avoid direct children.

For example:
ancestor:c:\windows !parent:c:\windows
(same as c:\windows\*\** )
For example, C:\Users\* gives all files and folders below Users in addition to subfolders. I thought this is supposed to give only folders and files directly below Users?
void
Developer
Posts: 16897
Joined: Fri Oct 16, 2009 11:31 pm

Re: parent path part ?

Post by void »

Depends if you have disabled Tools -> Options -> Search -> Match whole filename when using wildcards.

With "Match whole filename when using wildcards" disabled, all subfolders will be included.
Match whole filename when using wildcards is enabled by default.

You can override this behavior and force matching the whole filename with the exact: search modifier.

For example:

exact:C:\Users\*

exact:
anmac1789
Posts: 673
Joined: Mon Aug 24, 2020 1:16 pm

Re: parent path part ?

Post by anmac1789 »

void wrote: Fri Mar 10, 2023 8:00 am Depends if you have disabled Tools -> Options -> Search -> Match whole filename when using wildcards.

With "Match whole filename when using wildcards" disabled, all subfolders will be included.
Match whole filename when using wildcards is enabled by default.

You can override this behavior and force matching the whole filename with the exact: search modifier.

For example:

exact:C:\Users\*

exact:
How can I use this with custom columns?
void
Developer
Posts: 16897
Joined: Fri Oct 16, 2009 11:31 pm

Re: parent path part ?

Post by void »

addcolumn:columna columna:=pathpart(pathpart($fullpath:))

PATHPART()



There's also a Parent Path property that shows the same information.
anmac1789
Posts: 673
Joined: Mon Aug 24, 2020 1:16 pm

Re: parent path part ?

Post by anmac1789 »

All this does is remove the last directory level ...

level1/level2/level3/level4

after fullpath command
level1/level2/level3

What is the purpose for that full path code ? and may I ask why do you use $ sign ?
Post Reply