Page 1 of 1

TFindFile, wrong Result when searching for *1*

PostPosted: September 19th, 2006, 1:52 pm
by Farderlorn
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?

PostPosted: September 19th, 2006, 3:56 pm
by Kambiz
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.