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. Folder Size

Folder Size

Scheduled Pinned Locked Moved C / C++ / MFC
linuxquestion
8 Posts 3 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.
  • J Offline
    J Offline
    john5632
    wrote on last edited by
    #1

    Hi, Is there any machenism using Shell or anything else to calculate the size of a folder?

    P 1 Reply Last reply
    0
    • J john5632

      Hi, Is there any machenism using Shell or anything else to calculate the size of a folder?

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      Check XFolderSize[^] from Hans Dietrich.

      J 1 Reply Last reply
      0
      • P prasad_som

        Check XFolderSize[^] from Hans Dietrich.

        J Offline
        J Offline
        john5632
        wrote on last edited by
        #3

        Is there any API like when window context menu propprty method? As windows calculates size very fast, there should be any API like this.

        P 1 Reply Last reply
        0
        • J john5632

          Is there any API like when window context menu propprty method? As windows calculates size very fast, there should be any API like this.

          P Offline
          P Offline
          prasad_som
          wrote on last edited by
          #4

          MPTP wrote:

          there should be any API like this.

          Not in my information. There needs to be a class(article) for this requirement. So you should understand there is no such API.

          MPTP wrote:

          As windows calculates size very fast

          Have you tried class in given link ? Isn't that fast ?

          N 1 Reply Last reply
          0
          • P prasad_som

            MPTP wrote:

            there should be any API like this.

            Not in my information. There needs to be a class(article) for this requirement. So you should understand there is no such API.

            MPTP wrote:

            As windows calculates size very fast

            Have you tried class in given link ? Isn't that fast ?

            N Offline
            N Offline
            Naveen
            wrote on last edited by
            #5

            prasad_som wrote:

            Not in my information.

            You are right. I checked the call stack using process explorer while the size is been updated in the property sheet. It is using some function called SizeThreadProc() in the shell32.dll. May be if we can figure out the prototype of the funcion, it will be a nice hack. :)

            nave [OpenedFileFinder] [My Blog]

            P 1 Reply Last reply
            0
            • N Naveen

              prasad_som wrote:

              Not in my information.

              You are right. I checked the call stack using process explorer while the size is been updated in the property sheet. It is using some function called SizeThreadProc() in the shell32.dll. May be if we can figure out the prototype of the funcion, it will be a nice hack. :)

              nave [OpenedFileFinder] [My Blog]

              P Offline
              P Offline
              prasad_som
              wrote on last edited by
              #6

              Naveen wrote:

              SizeThreadProc()

              Looks like callback function. Must be adding up size of individual file in folder structure.

              N 1 Reply Last reply
              0
              • P prasad_som

                Naveen wrote:

                SizeThreadProc()

                Looks like callback function. Must be adding up size of individual file in folder structure.

                N Offline
                N Offline
                Naveen
                wrote on last edited by
                #7

                hmmm... BTW happy to see you back on codeproject. What happened in between?

                nave [OpenedFileFinder] [My Blog]

                P 1 Reply Last reply
                0
                • N Naveen

                  hmmm... BTW happy to see you back on codeproject. What happened in between?

                  nave [OpenedFileFinder] [My Blog]

                  P Offline
                  P Offline
                  prasad_som
                  wrote on last edited by
                  #8

                  Naveen wrote:

                  BTW happy to see you back on codeproject.

                  Thanks ! And congrats for being awarded as MVP.

                  Naveen wrote:

                  What happened in between?

                  Changed employer, Changed country and busy with work. :)

                  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