How to filter full paths via formatlist()?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

How to filter full paths via formatlist()?

Post by highend »

E.g.:
In the address bar:

Code: Select all

$a="D:\Temp\test\test1|D:\Temp\test\test1\test2|D:\Temp\test\test1\test2\test3";text formatlist($a, "f", "|", "!D:\*");
Works fine, the window is empty.

If only folders that don't contain "D:\Temp\test\test1\test2" should be returned:

Code: Select all

$a="D:\Temp\test\test1|D:\Temp\test\test1\test2|D:\Temp\test\test1\test2\test3";text formatlist($a, "f", "|", "!*test2*");
Works fine in this case, but probably returns wrong folders when more than one folder with "test2" in it exists (e.g. on different drives).

But what if full paths should be filtered?

Code: Select all

$a="D:\Temp\test\test1|D:\Temp\test\test1\test2|D:\Temp\test\test1\test2\test3";text formatlist($a, "f", "|", "!D:\Temp\test\test1\test2*");
Doesn't work. How to do it right?
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 67269
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: How to filter full paths via formatlist()?

Post by admin »

Weird, looks like a bug. Later...

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: How to filter full paths via formatlist()?

Post by highend »

Wasn't sure if it's really a bug or intended behavior...

Btw, what I found interesting:

While this works:

Code: Select all

$a="D:\Temp\test\test1|D:\Temp\test\test1\test2|D:\Temp\test\test1\test2\test3";text formatlist($a, "f", "|", "!D:\*");
If you only add the "T" for "Temp" in the filter expression, it stops to work:

Code: Select all

$a="D:\Temp\test\test1|D:\Temp\test\test1\test2|D:\Temp\test\test1\test2\test3";text formatlist($a, "f", "|", "!D:\T*");
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 67269
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: How to filter full paths via formatlist()?

Post by admin »

Yes, it was a bug. Fix comes.

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: How to filter full paths via formatlist()?

Post by highend »

Thanks, appreciated :)
One of my scripts helped you out? Please donate via Paypal

Post Reply