Page 1 of 1

How to filter full paths via formatlist()?

Posted: 29 Sep 2012 12:29
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?

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

Posted: 29 Sep 2012 13:45
by admin
Weird, looks like a bug. Later...

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

Posted: 29 Sep 2012 13:52
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*");

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

Posted: 29 Sep 2012 17:29
by admin
Yes, it was a bug. Fix comes.

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

Posted: 29 Sep 2012 17:41
by highend
Thanks, appreciated :)