10

The Windows API FindFirstFile() and FindFirstFileEx() accept wildcard characters for the path to search, "for example, an asterisk (*) or a question mark (?)". No where can I actually find an explanation of which others (if any) characters it accept, and more importantly what they mean in the context of FindFirstFile.

Can someone please provide an explanation? Thanks.

KTC
  • 8,967
  • 5
  • 33
  • 38
  • [Using wildcard characters](http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/find_c_search_wildcard.mspx?mfr=true "Using wildcard characters") [MS-DOS and Windows Wildcard Characters](http://msdn.microsoft.com/en-us/library/ms690414%28VS.85%29.aspx) – Kyle Alons Apr 01 '10 at 20:24
  • possible duplicate of [FindFirstFile undocumented wildcard or bug?](http://stackoverflow.com/questions/24190389/findfirstfile-undocumented-wildcard-or-bug) – paulm Mar 18 '15 at 18:28
  • How can a question be a duplicate of one that were asked 4 years later? – KTC Mar 21 '15 at 21:09

1 Answers1

6

There are actually five wildcard characters on Windows (from http://www.osronline.com/showThread.cfm?link=36720):

  • * = "match zero or more characters"
  • ? = "match one character"
  • < = "match zero or more characters using MS-DOS semantics"
  • > = "match one character using MS-DOS semantics"
  • " = "match dot using MS-DOS semantics"
nobody
  • 19,814
  • 17
  • 56
  • 77
  • See: https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ntifs/nf-ntifs-_fsrtl_advanced_fcb_header-fsrtlisnameinexpression – Erik Aronesty Mar 29 '19 at 19:20