Limitations on the Use of the '*' Wildcard Character (50075)



The information in this article applies to:

  • Microsoft MS-DOS operating system 3.1
  • Microsoft MS-DOS operating system 3.2
  • Microsoft MS-DOS operating system 3.21
  • Microsoft MS-DOS operating system 3.3
  • Microsoft MS-DOS operating system 3.3a
  • Microsoft MS-DOS operating system 4.0
  • Microsoft MS-DOS operating system 4.01
  • Microsoft MS-DOS operating system 5.0
  • Microsoft MS-DOS operating system 5.0a
  • Microsoft MS-DOS operating system 6.0
  • Microsoft MS-DOS operating system 6.2
  • Microsoft MS-DOS operating system 6.21
  • Microsoft MS-DOS operating system 6.22

This article was previously published under Q50075

SUMMARY

The asterisk (*) wildcard character cannot be placed before a static string in a wildcard search path. When the MS-DOS file search routines find an asterisk wildcard character in a path, the routines fill the remaining filename field with the question-mark (?) wildcard character. When this happens, any static text in the filename following the asterisk is discarded.

MORE INFORMATION

For example, the following wildcard string:
   FIL*NAM.*
				
is interpreted by MS-DOS as follows:
   FIL?????.???
				
This string finds all files starting with the character string "FIL" instead of all files beginning with "FIL" and ending with "NAM" and having a non-specific number and type of characters between "FIL" and "NAM." To find the files as described above, three separate searches must be made. These searches are as follows:
   FILNAM.*
   FIL?NAM.*
   FIL??NAM.*
				

Modification Type:MajorLast Reviewed:5/12/2003
Keywords:KB50075