+ Reply to Thread
Results 1 to 5 of 5

Looking for Macro to pull folder name and folder size of a specific location.

  1. #1
    Registered User
    Join Date
    06-29-2013
    Location
    Boston, MA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Looking for Macro to pull folder name and folder size of a specific location.

    As the title says, I'm looking for a macro that I can direct to a specific directory and have it pull its folders name and its folder size, not item or file size. Was wondering if anyone had any expertise in this area?
    Please hit me up. Thank you.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Looking for Macro to pull folder name and folder size of a specific location.

    Hello TheDirtyDrunk,

    This macro will list the names of all folders in a given parent directory on "Sheet1" starting with cells "A2:B2". It is assumed row 1 contains headers.

    System folders do not list their size. Only Zip Folders do.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Looking for Macro to pull folder name and folder size of a specific location.

    You could get the subfolder size if you add the function "FolderSize" written by RoyUK (I think) but first you need to add some lines to Leith's macro. So change line

    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Then you add lins after
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Finnaly after the "End Sub" line you add code for the FolderSize function

    Please Login or Register  to view this content.
    Alf

  4. #4
    Registered User
    Join Date
    06-29-2013
    Location
    Boston, MA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Looking for Macro to pull folder name and folder size of a specific location.

    THanks everyone,

    I was able to pull this together to generate a list with file size in bytes

    Please Login or Register  to view this content.
    Its dirty but it got the job done.
    Last edited by TheDirtyDrunk; 07-07-2016 at 08:03 AM.

  5. #5
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Looking for Macro to pull folder name and folder size of a specific location.

    You are welcome.

    Thanks for feedback and rep

    Alf

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro to pull file from folder location Automatically
    By Ngutierr in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-06-2015, 04:35 AM
  2. Open Folder (Prompt User for final folder name in location path)
    By synergeticink in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-21-2014, 03:33 PM
  3. create new folder at one location and copy photos in that folder from other location
    By meer_ali in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2014, 05:20 AM
  4. Counting files in folder including subfolders also and folder size
    By mido609 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2012, 03:26 PM
  5. Replies: 1
    Last Post: 01-24-2006, 11:35 AM
  6. Replies: 1
    Last Post: 01-24-2006, 11:00 AM
  7. Replies: 1
    Last Post: 01-24-2006, 12:25 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1