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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. API used to files name inside a folder

API used to files name inside a folder

Scheduled Pinned Locked Moved C / C++ / MFC
json
6 Posts 6 Posters 2 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.
  • N Offline
    N Offline
    neha agarwal27
    wrote on last edited by
    #1

    Hi all, There is a api which is used to find files inside the folder/Directory. Can anybody please tell me that api name. Thanks in advance

    M H A S 4 Replies Last reply
    0
    • N neha agarwal27

      Hi all, There is a api which is used to find files inside the folder/Directory. Can anybody please tell me that api name. Thanks in advance

      M Offline
      M Offline
      manish patel
      wrote on last edited by
      #2

      Use CFile. Make object of CFile and using that object open a file with file name. If File exist than it returns nonzero otherwise it will return zero. Regards, Manish Patel

      1 Reply Last reply
      0
      • N neha agarwal27

        Hi all, There is a api which is used to find files inside the folder/Directory. Can anybody please tell me that api name. Thanks in advance

        A Offline
        A Offline
        Amar Sutar
        wrote on last edited by
        #3

        You can use CFileFind(MFC) or WIN32_FIND_DATA(WIN32). Amar:)

        P 1 Reply Last reply
        0
        • N neha agarwal27

          Hi all, There is a api which is used to find files inside the folder/Directory. Can anybody please tell me that api name. Thanks in advance

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          See CFileFind Class.

          1 Reply Last reply
          0
          • A Amar Sutar

            You can use CFileFind(MFC) or WIN32_FIND_DATA(WIN32). Amar:)

            P Offline
            P Offline
            Paresh Chitte
            wrote on last edited by
            #5

            FindFirstFile. Regards, Paresh.

            1 Reply Last reply
            0
            • N neha agarwal27

              Hi all, There is a api which is used to find files inside the folder/Directory. Can anybody please tell me that api name. Thanks in advance

              S Offline
              S Offline
              Sethuraman K
              wrote on last edited by
              #6

              if u want to find exact file in a folder, CFileFind finder; finder.FindFile(_T("c:\\test.txt")); if u want to find all file in a folder, CFileFind finder; BOOL bWorking=1; while(bWorking) { bWorking=finder.FindNextFile(); TRACE("\n%s",(LPCTSTR)finder.GetFileName()); }

              Sethuraman.K

              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