error finding files
Moderators: white, Hacker, petermad, Stefan2
error finding files
When you have files with dots, finding files fails.
i.e. files named 2.21.34.jpg, 2.21.38.jpg, 2-21-36.jpg, etc
if you try to find: *2?21?3* does not find anything
i.e. files named 2.21.34.jpg, 2.21.38.jpg, 2-21-36.jpg, etc
if you try to find: *2?21?3* does not find anything
Confirmed. Apparently the issue is that the question mark is not a wildcard for the dot, but finds the dash just fine, i.e. 2-21-36.jpg is found but the other two are not found. If you replace the question mark with an asterisk/star, all files are found.
This is either a bug in TC or a documentation error. The help states "A question mark ? stands for exacly one character [...]" which, to me, means any character, including all special characters like dot, dash and so on; the German help even explicitly states "any character".
Regards
Dalai
This is either a bug in TC or a documentation error. The help states "A question mark ? stands for exacly one character [...]" which, to me, means any character, including all special characters like dot, dash and so on; the German help even explicitly states "any character".
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- sqa_wizard
- Power Member
- Posts: 3864
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
2sqa_wizard
Nope, that doesn't change anything. The asterisk also matches the extension if possible.
Regards
Dalai
Nope, that doesn't change anything. The asterisk also matches the extension if possible.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- sqa_wizard
- Power Member
- Posts: 3864
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
- ghisler(Author)
- Site Admin
- Posts: 48088
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The ? currently does not match the dot. Try this instead:
*2*21*3*
*2*21*3*
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
2ghisler(Author)
True, but what about the TC help which doesn't mention this or even states the opposite (German help), respectively? See my post above.
Regards
Dalai
True, but what about the TC help which doesn't mention this or even states the opposite (German help), respectively? See my post above.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- ghisler(Author)
- Site Admin
- Posts: 48088
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
OK, I found it - it's a bug in Windows function FindFirstFile!
Calling it with search string
c:\some directory\*2?21?3*
does NOT find the file. So the only workaround when using ? placeholders is searching for
c:\some directory\*.*
and do the name matching myself.
Calling it with search string
c:\some directory\*2?21?3*
does NOT find the file. So the only workaround when using ? placeholders is searching for
c:\some directory\*.*
and do the name matching myself.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
2ghisler(Author)
Wouldn't such change cause a slower search because FindFirstFile returns every file instead of only the matching ones? I imagine that this would make more I/O operations which is especially bad on HDDs. Am I wrong?
Regards
Dalai
Wouldn't such change cause a slower search because FindFirstFile returns every file instead of only the matching ones? I imagine that this would make more I/O operations which is especially bad on HDDs. Am I wrong?
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- ghisler(Author)
- Site Admin
- Posts: 48088
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, it would definitely be slower, at least on network drives. But it's unavoidable when using ? placeholder.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
2ghisler(Author)
Well, you could leave the code as is and update the help file instead. Maybe not ideal, but possible. My guess is that it worked in the past and Microsoft changed something in Windows API (FindFirstFile) at some point in time.
Regards
Dalai
Well, you could leave the code as is and update the help file instead. Maybe not ideal, but possible. My guess is that it worked in the past and Microsoft changed something in Windows API (FindFirstFile) at some point in time.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Why *.*? Search for *2*21*3* and then do own match won't work?ghisler(Author) wrote:Calling it with search string
c:\some directory\*2?21?3*
does NOT find the file. So the only workaround when using ? placeholders is searching for
c:\some directory\*.*
and do the name matching myself.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708
- ghisler(Author)
- Site Admin
- Posts: 48088
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
In principle, yes - but it would require a lot of changes: Currently TC supports just two modes: Either it passes the search filter to Windows if it's supported there, or it searches for *.* and makes its own comparison (e.g. when user specifies multiple filters).
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I just checked with Windows XP, with the same result - so if it did work it was a looong time ago.My guess is that it worked in the past and Microsoft changed something in Windows API (FindFirstFile) at some point in time.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fixed in TC 9.20b2
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar