-File search: Incorrect match with dot ('.')
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 22
- Joined: 2005-03-28, 12:50 UTC
-File search: Incorrect match with dot ('.')
In a folder tree, I have of files named
a.cpp
b.cpp
c.cpp
and some files named
a.cpp.a9394
b.cpp.b956
I attempt to find the latter by using file search with the following search term:
*.cpp.*
Expected result:
a.cpp.a9394
b.cpp.b956
Actual result:
a.cpp
b.cpp
c.cpp
a.cpp.a9394
b.cpp.b956
Edit: Also observed in version 7.50a
a.cpp
b.cpp
c.cpp
and some files named
a.cpp.a9394
b.cpp.b956
I attempt to find the latter by using file search with the following search term:
*.cpp.*
Expected result:
a.cpp.a9394
b.cpp.b956
Actual result:
a.cpp
b.cpp
c.cpp
a.cpp.a9394
b.cpp.b956
Edit: Also observed in version 7.50a
Last edited by Asperamanca on 2014-03-18, 13:47 UTC, edited 2 times in total.
Hello, Asperamanca.
I can reproduce your problem.
In the folder ~/Downloads/tmp some files named a.cpp b.cpp c.cpp a.cpp.a9394 b.cpp.b956 were created, content irrelevant.
Next I went to ~/Downloads and pressed <Alt><F7> in Total Commander 8.5.1ß3 and made it search for "*.cpp.*" (without the double quotes).
It found: a.cpp b.cpp c.cpp a.cpp.a9394 b.cpp.b956
Finally I went to ~/Downloads in Gnome Commander and launched Edit => File Search and made it search for "*.cpp.*" (without the double quotes).
Gnome Commander only found: a.cpp.a9394 b.cpp.b956
Testing environment:
Linux Mint 13 32-bit with Wine 1.4.1
Total Commander 8.51ß3 32-bit
Cheers,
Karl
I can reproduce your problem.
In the folder ~/Downloads/tmp some files named a.cpp b.cpp c.cpp a.cpp.a9394 b.cpp.b956 were created, content irrelevant.
Next I went to ~/Downloads and pressed <Alt><F7> in Total Commander 8.5.1ß3 and made it search for "*.cpp.*" (without the double quotes).
It found: a.cpp b.cpp c.cpp a.cpp.a9394 b.cpp.b956
Finally I went to ~/Downloads in Gnome Commander and launched Edit => File Search and made it search for "*.cpp.*" (without the double quotes).
Gnome Commander only found: a.cpp.a9394 b.cpp.b956
Testing environment:
Linux Mint 13 32-bit with Wine 1.4.1
Total Commander 8.51ß3 32-bit
Cheers,
Karl
MX Linux 21.3 64-bit xfce, Total Commander 11.50 64-bit
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
-
- Junior Member
- Posts: 22
- Joined: 2005-03-28, 12:50 UTC
It works as designed. What do you expect to find with *.* ? File names with a dot in it? Or file names with any extension, also empty ones (like doing "dir *.*" on the command prompt)?
To find file names with a dot in it you would use: *.*.*.
Or: *.*.?*
As said, in your case you can use: *.cpp.?*
Or you can use: *.cpp.*.
"filename" and "filename." are considered equivalent. Think of it as there is always an optional imaginary dot at the end of a file name.
To find file names with a dot in it you would use: *.*.*.
Or: *.*.?*
As said, in your case you can use: *.cpp.?*
Or you can use: *.cpp.*.
"filename" and "filename." are considered equivalent. Think of it as there is always an optional imaginary dot at the end of a file name.
Hi, white.
As the behaviour of Gnome Commander suggests the way how T.C. inteprets "*.cpp.*" is not the only way it might be understood.
To express it clearly: It is not what one would expect.
By the way, Krusader handles the search mask [*.cpp.*] in the same way as Gnome Commander and only returns the filenames
+ a.cpp.a9394
+ b.cpp.b956
In order to avoid being told that Linux file-managers might simply behave differently, let me add: Free Commander 2009.02b agrees with Gnome Commander and Krusader.
Knd regards,
Karl
As the behaviour of Gnome Commander suggests the way how T.C. inteprets "*.cpp.*" is not the only way it might be understood.
To express it clearly: It is not what one would expect.
By the way, Krusader handles the search mask [*.cpp.*] in the same way as Gnome Commander and only returns the filenames
+ a.cpp.a9394
+ b.cpp.b956
In order to avoid being told that Linux file-managers might simply behave differently, let me add: Free Commander 2009.02b agrees with Gnome Commander and Krusader.
Knd regards,
Karl
Last edited by karlchen on 2014-03-18, 16:45 UTC, edited 1 time in total.
MX Linux 21.3 64-bit xfce, Total Commander 11.50 64-bit
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
Actually * means empty extension too, and in such case trailing dot is simply removed from filename.
However I don't think that dot should be removed from mask too, every mask character should be in filename. I would expect to get all files with non-empty extensions on *.*, for all files including ones w/o extensions one may use just * (there should be a difference between * and *.*, and it is here).
However I don't think that dot should be removed from mask too, every mask character should be in filename. I would expect to get all files with non-empty extensions on *.*, for all files including ones w/o extensions one may use just * (there should be a difference between * and *.*, and it is here).
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
TC always assumes a dot at the end of a name (because files can have multiple dots now), that's why the above also matches empty extensions.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Well, Unix does not have the extension model. So *.* is similar as *A* on such systems.karlchen wrote:In order to avoid being told that Linux file-managers might simply behave differently, let me add: Free Commander 2009.02b agrees with Gnome Commander and Krusader.
That would break compatibility big time. I don't think users will like it when after updating TC a lot of things don't work as before anymore.MVV wrote:I would expect to get all files with non-empty extensions on *.*, for all files including ones w/o extensions one may use just * (there should be a difference between * and *.*, and it is here).
BTW. If I use Windows XP Find and search for *.*, it also finds files without extension.
When I use Windows XP find, it does work like this. When I use dir on the command prompt it does not.HBB wrote:As a standart user, I understand the *.cpp.* as the words which should include the word .cpp. completely in it (with/without preceding/following characters). This seems to me more logical.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
It's a question of definition, but I prefer to keep it this way - otherwise *.* would only find files with at least one dot in them, as on Linux. But on Windows, everyone expects that *.* finds all files, also those without extension.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com