home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / doshelp / helpsb.zoo / help / definit / wildcard.hlp < prev   
Encoding:
Text File  |  1989-01-01  |  1.9 KB  |  38 lines

  1. WILDCARDS (* and ?)
  2.  
  3. The ? and * characters have special significance to DOS when they are used as 
  4. a part of a filename or an extension. For obscure historical reasons they are 
  5. called wildcards. Wildcards cannot be used in directory names.
  6.  
  7.         *                    ?
  8.  
  9. An asterisk (*) will match any string    A question mark (?) will match any
  10. of characters at the END of a filename    single character in the same relative
  11. or an extension. For example, HE* will    position in a filename or extension.
  12. match HELLO, HEPP, HEX, HE, HEROIC,    For example, HE??O will match HELLO,
  13. HENPECK, and any other filename that    HEPPO, HEXYO, and any other filename
  14. begins with HE, but it will not match    that is five characters long and begins
  15. H.                     with HE and ends with O, but it will
  16.                     not match HELP (which is only four
  17. *.ASM would match any filename in the    characters long). However, HE??? would
  18. current directory with an extension of    match HELP (and any other filename less
  19. .ASM. TESTPROG.* would match any    than five characters long beginning
  20. filename in the current directory with    with HE).
  21. a filename of TESTPROG, no matter what
  22. the extension.                ?.ASM would match any filename that was
  23.                     one character long with an extension
  24. *.* will match ALL filenames in the    of .ASM. TESTPROG.A?? would match any
  25. current directory, so use it with       extension of the file named TESTPROG,
  26. caution.                that began with A.
  27.  
  28.  
  29. WARNING: *X.* IS EXACTLY THE SAME AS *.*, because * matches any string of 
  30. characters at the END of a filename!
  31.  
  32. HINT: If a "bad" filename (one with characters that cannot be readily entered
  33. from the keyboard) somehow gets created, and you cannot delete it explicitly,
  34. use ? to match the "bad" part of the filename. For example, the file 
  35. OOPS*.TXT could be deleted by the command
  36.  
  37.     DEL OOPS???.TXT.
  38.