I have some files like this:
New Textfile.txt
New Textfile-[test].txt
New Textfile-[test2].txt
New Textfile-[non].txt
New Textfile-[non2].txt
New Textfile-01-[non].txt
When I apply visual filter to those files, the list isn't what I expected:
Visual filter: Files shown in list
*[, [*, *], ]*, [*][/color], *[*][/color] or *[*]*[/color]: nothing
[test], [test2], *[test], *[test]*, [non] or [non2]: all files
New Textfile-[test] or any filename contains square brackets: nothing
But these are ok:
*[*, [, *]* or ]: all files contain "[" or "]"
[test: New Textfile-[test].txt, New Textfile-[test2].txt
[test2: New Textfile-[test2].txt
[non: New Textfile-[non].txt, New Textfile-[non2].txt, New Textfile-01-[non].txt
New Textfile-[test: New Textfile-[test].txt, New Textfile-[test2].txt
Visual filter and square brackets
-
- Site Admin
- Posts: 60598
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Visual filter and square brackets
Opening square brackets must be surrounded by square brackets, else they are interpreted as group markers in pattern syntax:
Try this to find all "*[*]*":
Try this to find all "*[*]*":
Code: Select all
*[[]*]*
FAQ | XY News RSS | XY Twitter
Re: Visual filter and square brackets
If so, is there a way to visual filter selected files with names contain square brackets?
As I didn't find anything about square brackets in visual filter help, it would be nice to have it in the document.
As I didn't find anything about square brackets in visual filter help, it would be nice to have it in the document.
-
- Site Admin
- Posts: 60598
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Visual filter and square brackets
As I already posted:atjnjk wrote:If so, is there a way to visual filter selected files with names contain square brackets?
As I didn't find anything about square brackets in visual filter help, it would be nice to have it in the document.
Code: Select all
*[[]*]*
FAQ | XY News RSS | XY Twitter
Re: Visual filter and square brackets
Sorry, my last post is not as clear as I wanted, and I did read your previous post. What I want to know is if I select some files like: New Textfile-[test].txt, New Textfile-[test2].txt, is there a quick way to visual filter those files (show only those files in list)? I've read some posts about visual filtering selected files, but those scripts don't work with filenames contain square brackets.admin wrote:As I already posted:Code: Select all
*[[]*]*
-
- Site Admin
- Posts: 60598
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Visual filter and square brackets
Ah. In the next version use this:atjnjk wrote:Sorry, my last post is not as clear as I wanted, and I did read your previous post. What I want to know is if I select some files like: New Textfile-[test].txt, New Textfile-[test2].txt, is there a quick way to visual filter those files (show only those files in list)? I've read some posts about visual filtering selected files, but those scripts don't work with filenames contain square brackets.admin wrote:As I already posted:Code: Select all
*[[]*]*
Code: Select all
::filter '"sel" ' . get("SelectedItemsNames", "|"), 1;
FAQ | XY News RSS | XY Twitter
Re: Visual filter and square brackets
Thank you so much!