This forum uses cookies. Click X button to hide this message. What is stored? / Privacy
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

error finding files

 
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) Printable version
View previous topic :: View next topic  
Author Message
pbelon
Junior Member
Junior Member


Joined: 25 May 2017
Posts: 2

PostPosted: Wed May 02, 2018 12:25 pm    Post subject: error finding files Reply with quote

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
Back to top
View user's profile Send private message
Dalai
Power Member
Power Member


Joined: 28 Jan 2005
Posts: 6048
Location: Meiningen (Südthüringen)

PostPosted: Wed May 02, 2018 1:02 pm    Post subject: Reply with quote

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
_________________
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups
Back to top
View user's profile Send private message Send e-mail
sqa_wizard
Power Member
Power Member


Joined: 06 Feb 2003
Posts: 3350
Location: Germany

PostPosted: Wed May 02, 2018 1:02 pm    Post subject: Reply with quote

You are searching for files without extension.
Try *2?21?3*.jpg or just *2?21?3*.* if you like.
_________________
#5767 Personal license
Back to top
View user's profile Send private message
Dalai
Power Member
Power Member


Joined: 28 Jan 2005
Posts: 6048
Location: Meiningen (Südthüringen)

PostPosted: Wed May 02, 2018 1:08 pm    Post subject: Reply with quote

2sqa_wizard
Nope, that doesn't change anything. The asterisk also matches the extension if possible.

Regards
Dalai
_________________
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups
Back to top
View user's profile Send private message Send e-mail
sqa_wizard
Power Member
Power Member


Joined: 06 Feb 2003
Posts: 3350
Location: Germany

PostPosted: Wed May 02, 2018 1:17 pm    Post subject: Reply with quote

Quote:
Nope, that doesn't change anything

You are right (for the TC internal search).
I use the search with option "Everything" enabled, which works fine.
_________________
#5767 Personal license
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35725
Location: Switzerland

PostPosted: Thu May 03, 2018 3:01 am    Post subject: Reply with quote

The ? currently does not match the dot. Try this instead:
*2*21*3*
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dalai
Power Member
Power Member


Joined: 28 Jan 2005
Posts: 6048
Location: Meiningen (Südthüringen)

PostPosted: Thu May 03, 2018 8:55 am    Post subject: Reply with quote

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
_________________
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35725
Location: Switzerland

PostPosted: Fri May 04, 2018 4:36 am    Post subject: Reply with quote

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.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dalai
Power Member
Power Member


Joined: 28 Jan 2005
Posts: 6048
Location: Meiningen (Südthüringen)

PostPosted: Fri May 04, 2018 8:04 am    Post subject: Reply with quote

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
_________________
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35725
Location: Switzerland

PostPosted: Sun May 06, 2018 3:47 am    Post subject: Reply with quote

Yes, it would definitely be slower, at least on network drives. But it's unavoidable when using ? placeholder.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dalai
Power Member
Power Member


Joined: 28 Jan 2005
Posts: 6048
Location: Meiningen (Südthüringen)

PostPosted: Sun May 06, 2018 8:05 am    Post subject: Reply with quote

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
_________________
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups
Back to top
View user's profile Send private message Send e-mail
DrShark
Power Member
Power Member


Joined: 03 Nov 2006
Posts: 1111
Location: Kyiv, 68/262

PostPosted: Mon May 07, 2018 4:28 pm    Post subject: Reply with quote

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.
Why *.*? Search for *2*21*3* and then do own match won't work?
_________________
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35725
Location: Switzerland

PostPosted: Tue May 08, 2018 3:50 am    Post subject: Reply with quote

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
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
petermad
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 7779
Location: Valsted, Denmark

PostPosted: Tue May 08, 2018 4:06 pm    Post subject: Reply with quote

Quote:
My guess is that it worked in the past and Microsoft changed something in Windows API (FindFirstFile) at some point in time.

I just checked with Windows XP, with the same result - so if it did work it was a looong time ago.
_________________
#524
Danish Total Commander Translator
TC 9.20rc1 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit. TC 2.91b3 on Android 6.0

Get Extended Total Commander Menus
Back to top
View user's profile Send private message Send e-mail Visit poster's website
petermad
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 7779
Location: Valsted, Denmark

PostPosted: Wed May 09, 2018 2:05 pm    Post subject: Reply with quote

Fixed in TC 9.20b2 Smile
_________________
#524
Danish Total Commander Translator
TC 9.20rc1 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit. TC 2.91b3 on Android 6.0

Get Extended Total Commander Menus
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Imprint/Impressum: This site is maintained by Ghisler Software GmbH
Privacy Policy | Datenschutzerklärung | Politique de Confidentialité

Using phpBB © phpBB Group