Alt+F7 problem if dot in search string

Discussion of bugs and problems found in Altap Salamander. In your reports, please be as descriptive as possible, and report one incident per report. Do not post crash reports here, send us the generated bug report by email instead, please.
TÜV
Posts: 31
Joined: 21 Sep 2009, 14:37

Alt+F7 problem if dot in search string

Post by TÜV »

Alt+F7 search results are missing if there is a dot in the search string and the search string is not within asterisks.
Example: A file named "a.b.c.d.txt" is found by the input
*b.c*
but not by the input
b.c
like a file named "a-b-c-d.txt" is found by the input
b-c
Input of
"b.c"
causes the error message "File mask is syntactically incorrect."
User avatar
Ether
Posts: 1471
Joined: 10 May 2007, 16:08
Location: Czech Republic
Contact:

Re: Alt+F7 problem if dot in search string

Post by Ether »

TÜV wrote:Alt+F7 search results are missing if there is a dot in the search string and the search string is not within asterisks.
That's not actually a problem, if you know what to expect.
TÜV wrote:Example: A file named "a.b.c.d.txt" is found by the input *b.c* but not by the input b.c like a file named "a-b-c-d.txt" is found by the input b-c
Find primarily looks for exact matches, that's the reason why 'b.c' doesn't find 'a.b.c.d.txt'. It also considers any wildcards entered (* and ?), so that '*b.c*' does find 'a.b.c.d.txt'.

For simplicity's sake, if you enter search term that doesn't look as an actual filename, i.e. it doesn't contain any dots, the term is automagically enclosed by asterisks. You can see that if you perform a more time expensive search (e.g. for 'abc' on C:) and look at the title of the Find window. That works as a substring search - finds everything that contains the search term (not just those that are named the same).
TÜV wrote:Input of "b.c" causes the error message "File mask is syntactically incorrect."
Quotation marks (") are not allowed in file names.
Ελληνικά rulez.
Petr Solin
ALTAP Staff
ALTAP Staff
Posts: 1112
Joined: 08 Dec 2005, 09:13
Location: Novy Bor, Czech Republic
Contact:

Re: Alt+F7 problem if dot in search string

Post by Petr Solin »

This is explained in Help (press F1 key in Find dialog) for Named box:
Important note: when you specify mask without asterisk (*), question mark (?), and point (.), you will find all files and directories whose names are containing this mask (e.g. when you specify "dog", you will find "dogs.txt", "hotdog.jpg", etc.), you can prevent this by adding point (.) to the end of such mask (e.g. when you specify "dog.", you will find only "dog").
TÜV
Posts: 31
Joined: 21 Sep 2009, 14:37

search string syntax

Post by TÜV »

I used the F1 Help Index on
Regular Expressions Syntax
before posting the problem. There it says:
Altap Salamander uses this library to match regular expressions.
and
'.' - matches any single character (for example, 'do.' matches 'dog', 'dot', 'doe', etc.; 'd..r' matches 'door', 'deer', etc.)
In this help text a hint is missing that for Alt+F7 a different syntax is valid which can be found at
File Masks
.
File Masks
should be added in the Help Index.

At the moment
File Masks
is only a link inside
Find
.
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5231
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Alt+F7 problem if dot in search string

Post by Jan Rysavy »

Regular expressions are used for Search file content (try to clear the Search file content option to see dependent options) in the Find dialog box.
The Named field has nothing to do with regular expression. When you press F1 in the Find dialog box, you will see:
find.png
find.png (51.86 KiB) Viewed 7658 times
User avatar
th.
Posts: 116
Joined: 04 Sep 2006, 23:09
Location: Germany

Re: Alt+F7 problem if dot in search string

Post by th. »

It says "adding point at the end of the mask" but in fact the substring search seems to be prohibited if there is a point in the mask at any position.
User avatar
mdruiter
Posts: 262
Joined: 22 Feb 2006, 15:33
Location: Amsterdam, The Netherlands
Contact:

Re: Alt+F7 problem if dot in search string

Post by mdruiter »

Exactly: "when you specify mask without asterisk (*), question mark (?), and point (.), you will find all files ... containing this mask". But when you specify a mask WITH an *, ? or ., you will only find exact matches, i.e. no asterisks are added automatically.
I can understand this confuses you at first. Look at the Find window caption to see what happens.
Groente, Michel.
User avatar
Ether
Posts: 1471
Joined: 10 May 2007, 16:08
Location: Czech Republic
Contact:

Re: Alt+F7 problem if dot in search string

Post by Ether »

If you want to use substring search, enclose the search term with asterisks - that's the correct way and will work regardless of dots.
Ελληνικά rulez.
User avatar
SvA
Posts: 483
Joined: 29 Mar 2006, 02:41
Location: DE

Re: Alt+F7 problem if dot in search string

Post by SvA »

What is this feature good for other than to confuse unsuspecting users like me?
User avatar
Ether
Posts: 1471
Joined: 10 May 2007, 16:08
Location: Czech Republic
Contact:

Re: Alt+F7 problem if dot in search string

Post by Ether »

SvA wrote:What is this feature good for other than to confuse unsuspecting users like me?
In theory, you should know that if you want to use substring search, then you have to use asterisks. But Windows breaks that theory, because IIRC it uses substring search by default. To avoid possible confusion as to why Salamander doesn't/can't search for files in a similar manner, a simplification was made, so that if a simple query (no dots or wildcards) is entered in Salamander's Find, a substring search is performed.
Ελληνικά rulez.
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5231
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Alt+F7 problem if dot in search string

Post by Jan Rysavy »

Exactly, it was a very requested feature from people coming from Windows Find.
Post Reply