Why does search for spaces '* *' not work as expected
Moderators: Hacker, petermad, Stefan2, white
Why does search for spaces '* *' not work as expected
When I search for '* *' I get as result all files. When I search for ' ' I get all files with spaces in the name.
Where does my brain refuse to think like TC???
sheepdog
[edit] I expected that'* *' would find all names with spaces in like the ' ' does.
As I see now a human thinking error. [/edit]
Where does my brain refuse to think like TC???
sheepdog
[edit] I expected that'* *' would find all names with spaces in like the ' ' does.
As I see now a human thinking error. [/edit]
Last edited by Sheepdog on 2004-09-30, 12:43 UTC, edited 1 time in total.
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Yep, that's right. An asterisk means all characters, the space is the separator for next search string. Therefore you are looking for all files (1st asterisk) and all files (2nd asterisk).When I search for '* *' I get as result all files.
Solution for your task is a simple space (without asterisk).
Space in the search criterion
2Sheepdog
Hi Stefan !
- What about typing :
* .* (asterisk|space|dot|asterisk) ?
- I tested, I find dirs and files having a space in the name.
Does it the trick ?
V G
Claude
Clo

- What about typing :
* .* (asterisk|space|dot|asterisk) ?
- I tested, I find dirs and files having a space in the name.


Claude
Clo
#31505 Traducteur Français de T•C French translator Aide en Français Tutoriels Français English Tutorials
Re: Space in the search criterion
2Clo
2Sheepdog
Which behavior do you expect?
Obvious not! Did you read/understood the posting before yours?Clo wrote:- What about typing :
* .* (asterisk|space|dot|asterisk) ?
- I tested, I find dirs and files having a space in the name.
Does it the trick ?
2Sheepdog
Which behavior do you expect?
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
Moreover the X-systems distinguish between lower/uppercase what causes just more troubles.SanskritFritz wrote:They definitely allow it the same way as you see it in XP. For about at least 20 years now... and it causes just as much trouble
sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
[face=courier]On 30-09-2004 14:14:27 +0000 nevidimka wrote:
n> Solution for your task is a simple space (without asterisk).
[^Y]
n> If you're looking for names with spaces you have to use
n> quotation marks e.g.
n> "* *"
Actually the thing is Commander uses not exactly the same logic with different search approaches.
You can quick search directory for names with spaces by '* ' (with one asterisk), but '"* "' (one asterisk with quotation marks) won't work in filters ("Expand selection") or search ("Find Files") - you have to use '"* *"' (two asterisks with quotation marks) for the same purpose.
Well, I understand that one have to use quotation marks in such a strings 'cause "the space is the separator for next search string" but as you can see ' ' (space w/o any quotation marks) works perfectly in "Find Files" dialog, (though you can't save it as filter 'cause "Expand selection" and "Find Files" share saved entries and actually should have the same syntax). But in "Expand selection" ' ' (space w/o any quotation marks) works like a wildcard (and BTW "Expand selection\Specify file type" history dropdown disables after ' ' execution 8\).
BTW, in previous Commander versions one have to use double quotation marks ('""* *""') to search for file names with spaces, so that strange old behavior was fixed but I can't remember Christian announced this fix somewhere 8\.[/face]
n> Solution for your task is a simple space (without asterisk).
[^Y]
n> If you're looking for names with spaces you have to use
n> quotation marks e.g.
n> "* *"
Actually the thing is Commander uses not exactly the same logic with different search approaches.
You can quick search directory for names with spaces by '* ' (with one asterisk), but '"* "' (one asterisk with quotation marks) won't work in filters ("Expand selection") or search ("Find Files") - you have to use '"* *"' (two asterisks with quotation marks) for the same purpose.
Well, I understand that one have to use quotation marks in such a strings 'cause "the space is the separator for next search string" but as you can see ' ' (space w/o any quotation marks) works perfectly in "Find Files" dialog, (though you can't save it as filter 'cause "Expand selection" and "Find Files" share saved entries and actually should have the same syntax). But in "Expand selection" ' ' (space w/o any quotation marks) works like a wildcard (and BTW "Expand selection\Specify file type" history dropdown disables after ' ' execution 8\).
BTW, in previous Commander versions one have to use double quotation marks ('""* *""') to search for file names with spaces, so that strange old behavior was fixed but I can't remember Christian announced this fix somewhere 8\.[/face]
[face=courier]The Protoss do NOT run from their enemies.
It is here, that we shall make our stand.[/face]
It is here, that we shall make our stand.[/face]