TFindFile, wrong Result when searching for *1*

Please discuss general Delphi programming topics here.

TFindFile, wrong Result when searching for *1*

Postby Farderlorn » September 19th, 2006, 1:52 pm

I use Delphi 7 Pro.
I used the example for TFindFile, to find all files with "1" in the name.

Criteria.Files.FileName := '*1*';
or '*1.*', '*1', ...

The Result contains also Files without a "1" in the name.

I found this Problem only with the 1.

*3* for example works fine (if you are looking for Files with a 3 in the name :wink: )

Any idea?
Farderlorn
Member
Member
 
Posts: 2
Joined: June 16th, 2006, 2:21 pm

Postby Kambiz » September 19th, 2006, 3:56 pm

The wildcards in FindFile are similar to DOS wildcards. This means the characters after the first asterisk (*) are ignored.

I think the same happens for *3* too.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron