Results 1 to 5 of 5

Thread: FindFirstFile and Wildcards

  1. #1

    Thread Starter
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032

    FindFirstFile and Wildcards

    Anyone have some insight into the syntax behind the wildcards you can pass to FindFirstFile? I've noticed that passing "path\*" and "path\*.*" both cause all files and folders to be returned, where I would have expected the second to only return things with a dot somewhere in the name. No big deal, I guess.

    Thanks,
    Josh
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  2. #2
    jim mcnamara
    Guest
    There's a big discussion on this in MSDN.
    For FindFirstFile -
    * = replace with any character, at least one character. not a period
    ? = replace with one character or zero characters, not a period

    This finds all the file with .htm

    *.htm? - gets both .html & .htm
    *. - gets directory files
    *.* - all files except directories and files with no type extension

  3. #3

    Thread Starter
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Where is this on MSDN?

    *.htm? - gets both .html & .htm
    Isn't it limited by 8.3 filenames so *.htm still gets .html?


    *.* - all files except directories and files with no type extension
    This is definately getting directories and text files I have with no extension?

    Thanks,
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  4. #4
    jim mcnamara
    Guest
    Start here - and no, it's not 8.3 names the api uses FAT32 and NTFS names, it's not a DOS call.

    http://support.microsoft.com/default...;EN-US;q130860

  5. #5

    Thread Starter
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    I'm running Windows 2000 Pro SP2. Using *.htm matches both .htm and .html files...
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width