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. Other Discussions
  3. IT & Infrastructure
  4. C file opening

C file opening

Scheduled Pinned Locked Moved IT & Infrastructure
tutorialquestion
3 Posts 1 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    is there any way to look for files you dont know are there?...For example say you need to open all the files from "1.txt" to "10000.txt" and take the info from them...but maybe only 5 or so files are actually there. How can you scan a dir to see what files are there?

    L 2 Replies Last reply
    0
    • L Lost User

      is there any way to look for files you dont know are there?...For example say you need to open all the files from "1.txt" to "10000.txt" and take the info from them...but maybe only 5 or so files are actually there. How can you scan a dir to see what files are there?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Look up info on CFileFind. It works for this type of search. Note: You must call FindNextFile at least once before using other member functions.

      1 Reply Last reply
      0
      • L Lost User

        is there any way to look for files you dont know are there?...For example say you need to open all the files from "1.txt" to "10000.txt" and take the info from them...but maybe only 5 or so files are actually there. How can you scan a dir to see what files are there?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Win32 API - FindFirstFile, FindNextFile, FindClose.

        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