Search for non-empty files or folders contains empty result
Moderators: fgagnon, nikos, Site Mods
-
EMathews3
- Bronze Member

- Posts: 100
- Joined: 2014 Aug 23, 12:54
Search for non-empty files or folders contains empty result
Using Ctrl+F Find, no results come back. Regardless of what setup happens in the dialog box, the scrap container is always empty, and the MsgBox says "No items match the specified filter". This started one day and has not stopped. What could be wrong?
Correction: Now searched using a Predefined rule-set, which worked. Then searched *.*, and it seems to be working again as expected. Duhhh.
xp2 5.4.x Ult
Correction: Now searched using a Predefined rule-set, which worked. Then searched *.*, and it seems to be working again as expected. Duhhh.
xp2 5.4.x Ult
-
Kilmatead
- Platinum Member

- Posts: 4842
- Joined: 2008 Sep 30, 06:52
- Location: Baile Átha Cliath
Re: Search for non-empty files or folders contains empty result
I once set the "fuzzy" thingy to 0 to activate regex-mode (which the dialogue then "helpfully" saved), and it took me 2 days of completely nonsensical results to figure out what happened and how I broke it. I mean, who looks at that setting, despite it being right under my nose?
It's always the little things that make you want to cry, throw it all out the window, give up and just become a hobo.Steely Dan wrote:'Rikki Don't Lose That Number'
Incidentally, and I don't recall the full reasoning behind it, but the recommended "match-all" string is actually *? instead of *.* as fgagnon pointed out some 16 years ago, now. Just a wee bit o' trivia.
-
nikos
- Site Admin

- Posts: 16344
- Joined: 2002 Feb 07, 15:57
- Location: UK
Re: Search for non-empty files or folders contains empty result
when in doubt click on CLEAR button then start with your filter definition
or switch the dialog to simple mode (a v6 feature) that has very few options and is simpler to use
or switch the dialog to simple mode (a v6 feature) that has very few options and is simpler to use
-
Tuxman
- Platinum Member

- Posts: 1708
- Joined: 2009 Aug 19, 07:49
Re: Search for non-empty files or folders contains empty result
*? covers a file named "README". *.* does not cover a file named "README". That's the whole point, I guess.Kilmatead wrote: 2025 Apr 25, 20:37 Incidentally, and I don't recall the full reasoning behind it, but the recommended "match-all" string is actually *? instead of *.* as fgagnon pointed out some 16 years ago, now.
I'm not entirely sure how "*?" makes sense outside a regular expression though - "*" should be enough.
-
nikos
- Site Admin

- Posts: 16344
- Joined: 2002 Feb 07, 15:57
- Location: UK
Re: Search for non-empty files or folders contains empty result
the reason for this klutz is that xplorer2 removes any solitary * found in NAMED, so you trick it with *?
-
Kilmatead
- Platinum Member

- Posts: 4842
- Joined: 2008 Sep 30, 06:52
- Location: Baile Átha Cliath
Re: Search for non-empty files or folders contains empty result
Lord knows I scorn the abusive world of commerce for the fantastic scam that it is, but I'm pretty sure there's some kind of obscure statute in the businessman's rule-book that says you're probably not supposed to use words like "klutz" and "trick" with regard to your own product. 
-
johngalt
- Gold Member

- Posts: 653
- Joined: 2008 Feb 10, 19:41
- Location: 3rd Rock
Re: Search for non-empty files or folders contains empty result
Interesting. *.* should, theoretically, cover that. .* should indicate all files with an extension, even those without one. But, apparently, null values don't count for .*, huh?Tuxman wrote: 2025 Apr 26, 14:18*? covers a file named "README". *.* does not cover a file named "README". That's the whole point, I guess.Kilmatead wrote: 2025 Apr 25, 20:37 Incidentally, and I don't recall the full reasoning behind it, but the recommended "match-all" string is actually *? instead of *.* as fgagnon pointed out some 16 years ago, now.
I'm not entirely sure how "*?" makes sense outside a regular expression though - "*" should be enough.
Weird.
-
Tuxman
- Platinum Member

- Posts: 1708
- Joined: 2009 Aug 19, 07:49
Re: Search for non-empty files or folders contains empty result
Why?nikos wrote: 2025 Apr 26, 15:03 the reason for this klutz is that xplorer2 removes any solitary * found in NAMED
-
nikos
- Site Admin

- Posts: 16344
- Joined: 2002 Feb 07, 15:57
- Location: UK
Re: Search for non-empty files or folders contains empty result
for why am i in this prison put 
-
Kilmatead
- Platinum Member

- Posts: 4842
- Joined: 2008 Sep 30, 06:52
- Location: Baile Átha Cliath
Re: Search for non-empty files or folders contains empty result
You know you're in trouble when Nikos starts quoting Jim Jarmusch... (on a Tom Waits bender this month, are we?)
Of course, it would never dawn on Nikos, Zack, or Roberto to just... umm... not delete the lone asterisk? Or, <gasp!>, silently replace it with the kludge itself, and just match everything. 
Sweaty-toothed Madmen aside, it's crazy difficult to do this sort of thing without resorting to regex... or the dreaded recursion logic...Down by Law wrote:Zack: For why are you in this prison put?
Roberto: Me? I killed a man.
Zack: You killed a man, huh? What'd you do that for, Bob? The guy didn't like Walt Whitman?
Roberto: I never ask-a to dis man if he like-a de Walt Whitman.
Code: Select all
BOOL MatchSpecW(LPWSTR Tame, LPWSTR Wild) {
while (*Wild) {
switch (*Wild) {
case L'?' :
if (!(*Tame)) return FALSE;
++Tame;
++Wild;
break;
case L'*' :
if (MatchSpecW(Tame, Wild + 1)) return TRUE;
if (*Tame && MatchSpecW(Tame + 1, Wild)) return TRUE;
return FALSE;
default :
if (towlower(*Tame++) != towlower(*Wild++)) return FALSE;
break;
}
}
return !(*Tame) && !(*Wild);
}
-
nikos
- Site Admin

- Posts: 16344
- Joined: 2002 Feb 07, 15:57
- Location: UK
Re: Search for non-empty files or folders contains empty result
as for the * it is called "sanitizing the input"; 4 y are u to keep something that does nothing, same as an empty box?
-
Kilmatead
- Platinum Member

- Posts: 4842
- Joined: 2008 Sep 30, 06:52
- Location: Baile Átha Cliath
Re: Search for non-empty files or folders contains empty result
You can call it whatever you like, but it doesn't "do nothing" - I would safely imagine that 99.9% of users would suggest (and expect) it to match everything, as it most certainly would in almost every other programme in the Windows milieu.
If, computationally-speaking, it is an empty box, then it's your job to make it "just work" anyway, no?
Live the paradox daddy-o, sometimes you gotta do what's wrong in order to do what's right.
(And yes, I appreciate the irony in that logic - if I'm walking down a scary back-alley and I "expect" a serial-killer to jump out and live up to his occupation, then that's just my fault for having poor expectations, but it doesn't negate them - despite the killer negating me.
-
nikos
- Site Admin

- Posts: 16344
- Joined: 2002 Feb 07, 15:57
- Location: UK
Re: Search for non-empty files or folders contains empty result
ai skreama, you skreama, we all skreama.... for ais kreama 
-
Kilmatead
- Platinum Member

- Posts: 4842
- Joined: 2008 Sep 30, 06:52
- Location: Baile Átha Cliath
Re: Search for non-empty files or folders contains empty result
Ok, as you seem to be gobbling up the little yellow pills today, I'll put it another way: Before a search, one could say you're in front of Schrödinger's Box where a blank search is the equivalent of being both empty and yet containing (the potential of) all objects at the same time. We won't know until we see the results - if I see no results, I might erroneously believe it to be empty, yet I know that '*' will match even the atoms in the apparently empty space. Where are my atoms?
Invert your expectations.

-
johngalt
- Gold Member

- Posts: 653
- Joined: 2008 Feb 10, 19:41
- Location: 3rd Rock
Re: Search for non-empty files or folders contains empty result
Or, to put it more another way:
Create two files in a directory, one with an extension and the other without.
Windows CMD processor finds both files regardless of if you run, or

Create two files in a directory, one with an extension and the other without.
Windows CMD processor finds both files regardless of if you run
Code: Select all
dirCode: Select all
dir *Code: Select all
dir *.*