Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. List of files in a directory

List of files in a directory

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bugDanny
    wrote on last edited by
    #1

    In my app I need to right a function to search through all the files in a directory for a particular statement. Is there a way my program can retrieve a list of the files in a directory so that I can step through that list and open one at a time? Danny

    C S 2 Replies Last reply
    0
    • B bugDanny

      In my app I need to right a function to search through all the files in a directory for a particular statement. Is there a way my program can retrieve a list of the files in a directory so that I can step through that list and open one at a time? Danny

      C Offline
      C Offline
      carks
      wrote on last edited by
      #2

      If you use MFC you might look at CFileFind Cheers,

      B 1 Reply Last reply
      0
      • C carks

        If you use MFC you might look at CFileFind Cheers,

        B Offline
        B Offline
        bugDanny
        wrote on last edited by
        #3

        Thanks! Danny

        T 1 Reply Last reply
        0
        • B bugDanny

          Thanks! Danny

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          Here Is one more Implementation of CFileFind:- http://www.codeproject.com/file/cfilefinderex.asp[^]

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta VC Forum Q&A :- I/ IV

          1 Reply Last reply
          0
          • B bugDanny

            In my app I need to right a function to search through all the files in a directory for a particular statement. Is there a way my program can retrieve a list of the files in a directory so that I can step through that list and open one at a time? Danny

            S Offline
            S Offline
            sunit5
            wrote on last edited by
            #5

            u can also use API FindFirstFile()AND FindNextFile()

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups