Listing files in a directory.

This is a discussion on Listing files in a directory. within the C++ Programming forums, part of the General Programming Boards category; Sorry...

  1. #1
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    Sorry
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  2. #2
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768

    Listing files in a directory.

    Can someone please remind me of the function used to scan a directory for a list of files it contrains, by file type... *.txt

    Thank you.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  3. #3
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    I am not sure there are standard functions for this.

    Perharps search MSDN for WinAPI functions. Maybe FindFirstFile() and FindNextFile().
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  4. #4
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    http://www.adrianxw.dk/SoftwareSite/index.html is always a good place to learn. There are other ways, though. Boost has some functionality which deals with directories etc.

  5. #5
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    Quote Originally Posted by maxorator
    I am not sure there are standard functions for this.

    Perharps search MSDN for WinAPI functions. Maybe FindFirstFile() and FindNextFile().
    FindFirstFile()... that's the function name I couldn't remember
    Thanks.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  6. #6
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,674
    There's always the FAQ.


    Nah, that's a really stupid idea, who'd bother to write a FAQ, let alone read one.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 06-05-2006, 03:24 AM
  2. Moving files from one directory to multiple dirs
    By csj561 in forum C Programming
    Replies: 7
    Last Post: 03-18-2005, 02:52 PM
  3. I Need To Know Some Things That I Can Put Into A Batch File
    By TheRealNapster in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 10-20-2003, 08:12 PM
  4. Dos commands hehe
    By Carp in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 01-17-2003, 01:51 PM
  5. searching files in directory
    By lobo in forum Windows Programming
    Replies: 5
    Last Post: 10-05-2001, 03:00 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21