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. Counting number of files

Counting number of files

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialworkspace
5 Posts 5 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.
  • T Offline
    T Offline
    theprinc
    wrote on last edited by
    #1

    Does anybody know how to count all the files on a windows environment. Currently i have a recursive method that goes through all the folders counting the number of files. It takes too long Any faster method would be appreciated Thank You Fate pays tax to know man

    N D T D 4 Replies Last reply
    0
    • T theprinc

      Does anybody know how to count all the files on a windows environment. Currently i have a recursive method that goes through all the folders counting the number of files. It takes too long Any faster method would be appreciated Thank You Fate pays tax to know man

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      theprinc wrote:

      Currently i have a recursive method that goes through all the folders counting the number of files.

      AFAIK this is the only way.


      Nibu thomas Software Developer

      1 Reply Last reply
      0
      • T theprinc

        Does anybody know how to count all the files on a windows environment. Currently i have a recursive method that goes through all the folders counting the number of files. It takes too long Any faster method would be appreciated Thank You Fate pays tax to know man

        D Offline
        D Offline
        Dennis Gourjii
        wrote on last edited by
        #3

        Something makes me think there is no faster way. I mean if there was one why would it take Explorer so long to count the number of files when you invoke Properties command for a particularly huge directory? Try optimizing your recursive function instead. After all, it gets called over and over again and if by chance it contains unoptimized code... well, it'll slow down for a reason.

        1 Reply Last reply
        0
        • T theprinc

          Does anybody know how to count all the files on a windows environment. Currently i have a recursive method that goes through all the folders counting the number of files. It takes too long Any faster method would be appreciated Thank You Fate pays tax to know man

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

          I Second NIBU!

          "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
          • T theprinc

            Does anybody know how to count all the files on a windows environment. Currently i have a recursive method that goes through all the folders counting the number of files. It takes too long Any faster method would be appreciated Thank You Fate pays tax to know man

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            theprinc wrote:

            Currently i have a recursive method that goes through all the folders counting the number of files. It takes too long Any faster method would be appreciated

            Show us the function and maybe we can make suggestions.


            "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

            "There is no death, only a change of worlds." - Native American Proverb

            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