Hi,
I'm working in a directory and I have to see whether a certain file exists (and have to do this about every one or two seconds). However I do not know the full name of the file except for this: _vcrxxxxxx.tmp (where xxxxx stands for a 32-bits integer)
I tried checking for it once by using a for loop with an int i=0 to 2^32 and once found by using PathFileExists(), I'd write down the name of the file so for every other check I'd know which file to look for. Well, doing 4 billion times PathFileExists() is NOT a good idea :). I tried it out and killed the process after a few minutes (on a 2400+ cpu and 7200rpm HD).
Does anybody have an idea on how to solve this I'd like to use wildcards but the function doesn't support it and I don't know other ways to do this.
Thanks a lot,
Ed.

Find file without knowing its full name
garrywilliam
wantedNooby
http://msdn.microsoft.com/library/default.asp url=/library/en-us/fileio/fs/findfirstfile.asp