Discussion:
FindFirstFile problem
(too old to reply)
Frank
2013-07-12 11:48:01 UTC
Permalink
Dear people,

I'm enumerating files in a directory using
FindFirstFile. If I give a pattern of "*.agx",
I get all files ending with ".agx" but also
all files ending with ".agxx". I renamed a few so
they should not be found but I can still
recognize them.

This looks like a strange behavior to me. How can I enumerate
only the ".agx"es? Of course I could check each file
name but it would be easier if only correct names were given.

TIA!
David Lowndes
2013-07-14 22:50:34 UTC
Permalink
Post by Frank
Of course I could check each file
name but it would be easier if only correct names were given.
Unfortunately you do need to do it yourself.

Dave
R.Wieser
2013-07-15 08:27:47 UTC
Permalink
Frank,
Post by Frank
I get all files ending with ".agx" but also
all files ending with ".agxx".
...
Post by Frank
This looks like a strange behavior to me.
Its possible that the above is the result of the OS trying to match long
filenames (upto 259 chars) as well as the older 8.3 ones. When a long
filename is converted to a 8.3 filename an extension longer than 3
characters will be clipped.

Regards,
Rudy Wieser
Post by Frank
Dear people,
I'm enumerating files in a directory using
FindFirstFile. If I give a pattern of "*.agx",
I get all files ending with ".agx" but also
all files ending with ".agxx". I renamed a few so
they should not be found but I can still
recognize them.
This looks like a strange behavior to me. How can I enumerate
only the ".agx"es? Of course I could check each file
name but it would be easier if only correct names were given.
TIA!
Continue reading on narkive:
Loading...