Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2006
    Posts
    7

    Calculate folder size

    Hi,
    I use the File.copy with the wildcat *.* command to copy folders with files form a stand alone application to hard disk. Is there a way to get the folder size?

  2. #2
    Join Date
    Jun 2005
    Posts
    470
    check the help file info (examples) about the File.GetSize action - the last example seems to be what you need.

  3. #3
    Join Date
    Aug 2006
    Posts
    7
    ok - i have to browse through all the files and add the file size.

  4. #4
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    To all of you who want to calculate the folder size, please read this post in the AMS50 Forum. It should be helpful!

  5. #5
    Join Date
    Jun 2005
    Posts
    470
    As I see the code in this post also enumerates all the files, gets the size of each and adds it to the sum.

    BTW it just can't be otherwise, afaik there is no even Windows API call that will return the size of a folder fast, without looping through all the files.
    For a folder with many files inside, getting the size takes time.

    I don't know for what reason you may need to calculate a folder size.
    If it's for a folder with files included in your installer, better calculate it before making the setup and include in the setup the already computed size.

  6. #6
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Tip: AutoIT 3 has a function for this need.

    Check it out here:
    http://www.autoitscript.com/autoit3/...DirGetSize.htm
    Intrigued

Similar Threads

  1. Get the size of folder contents?
    By element78 in forum AutoPlay Media Studio 5.0
    Replies: 26
    Last Post: 09-17-2009, 04:21 AM
  2. Folder size
    By malihu in forum AutoPlay Media Studio 6.0
    Replies: 0
    Last Post: 07-19-2006, 06:59 AM
  3. Example: Sending An Email Through Outlook
    By Brett in forum AutoPlay Media Studio 5.0 Examples
    Replies: 22
    Last Post: 12-05-2005, 06:11 PM
  4. cookies
    By goukilord10 in forum AutoPlay Media Studio 5.0
    Replies: 6
    Last Post: 05-20-2005, 04:08 PM

Posting Permissions

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