The information in this article applies to:
SYMPTOMSIn Windows 95, the FindFirstFile() function interprets a wildcard (?) as "any character" instead of "zero or one character," its true meaning. This incorrect interpretation causes some searches to return invalid results. For example, if the files, TEMP.TXT and TEMPTEMP.TXT, are in the same directory, the following code finds the TEMPTEMP.TXT file, but not the TEMP.TXT file:
Windows NT correctly finds both the TEMP.TXT and TEMPTEMP.TXT files.
RESOLUTIONTo work around this problem, choose an alternative wildcard search and apply further processing to eliminate files that are found by the alternative search, but do not match the original search. For example, the code above could be changed to search for TEM*.* instead of TEM?????.???. Then you could make an additional test for filenames that are up to 8 characters in length, followed by a ".", followed by up to 3 more characters (8.3). STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. Additional query words: 4.00 regular expression wild
Keywords : kbWinOS95bug |
Last Reviewed: September 24, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |