Disk space used and TI's compression

Discussion in 'Acronis True Image Product Line' started by Howard Kaikow, Dec 25, 2005.

Thread Status:
Not open for further replies.
  1. dld

    dld Registered Member

    Joined:
    May 6, 2005
    Posts:
    480
    Hi Howard... Yes, everything is working fine now. Previously I was getting an error message saying Excel could not be found, or something to that effect. With your latest revision this is what I get:

    http://img502.imageshack.us/img502/8989/screenshot0273ae.jpg

    The Output? choices are greyed out, which is fine.

    Clicking on Get Lists will cause the program to execute properly.

    HTH
     
  2. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Thanx.

    Yes, in the new version, I added code to check whether Excel is installed even before the Form is displayed. This does slow the loading of the Form, c'est la vie! Since there's no Excel, text output must be used, I display, and grey out, the options just as a reminder of what's going on.

    The earlier version would return the message that Excel could not be found if an Excel object could not be created. I think the program hung because I might have forgotten to enable the ByeBye button after that message. If so, that was sloppy on my part. If not, I dunno what caused the hang.

    So, in the new version, if the message that Excel could not start appears, then there is indeed a problem with the Excel installation or interference by a 3rd party add-in.
     
    Last edited: Dec 31, 2005
  3. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Periodically, I may post updates to the programs described in this thread.

    When I do, I will try to remember to modify the relevant HTML page to update the program's version number, I will no longer announce such things here.

    I did this last night for http://www.standards.com/index.html?GetFileTypeDistribution

    So, if you encounter a problem, please first try the latest version before reporting the problem.
     
  4. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    I just made available a major update to both programs.

    Program should now work in Win 95 (OSR2 or not). This change was tricky.
     
  5. dld

    dld Registered Member

    Joined:
    May 6, 2005
    Posts:
    480
    This is my GetFileTypeDistribution for 3 ATI images on my S drive.

    Start: 15:43:56 on 5 January 2006
    Drive: S:\
    Total Bytes: 33 805 864 960
    Free Bytes: 6 890 143 744
    Available Bytes: 6 890 143 744
    Used Bytes: 26 915 721 216
    Bytes in 5 files: 1 077 224 527
    Type Count Bytes Per Cent Cumulative PerCent
    tib 3 1077224442 99.99999211% 99.99999211%
    ini 1 65 0.00000603% 99.99999814%
    1 20 0.00000186% 100.00000000%
    End: 15:43:56 on 5 January 2006

    My Computer gives the results for each image rounded out to the nearest KB as:

    http://img462.imageshack.us/img462/1139/screenshot0282mv.jpg

    This gives a total of 26,217,802 KB of used space, neglecting the ini file of 65 bytes and the 20 bytes file with no extension.

    This is quite different from the 26 915 721 216 used bytes as given by GetFileTypeDistribution.

    I also can't understand why GetFileTypeDistribution gives a total of 1 077 224 527 for 5 files. Shouldn't the result in GetFileTypeDistribution for Used Bytes and Bytes in 5 files be the same?
     
  6. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    The above 4 lines use numbers provided by an API call, and you should see identical numbers (if no files have changed) by opening My Computer, right clicking on the drive, and examining properties.

    Note that for some drives, the numbers are often changing due to continuously running system/app software, so there is not always an exact match.

    The numbers in the above line are obtained by my recursively calling an API function and adding up the numbers.

    If you open a command window, cd to the root of the drive, and enter the command

    Code:
    dir/s/-p
    
    You should see the same, or very close numbers.

    Such differences are to be expected, as the "Used Bytes" total includes more than just files, e.g., it includes file system structures, directories, and space that is not part of the file system, but is used anyway, e.g., a special partition.

    It should be close to the result of

    Code:
    dir/s/-p
    
    Note: I just put out another version (3.0.0.1) which uses more Curency data types instead of the Double data type. Do not think that it will make a difference (other than to slow down the program).

    I have not (yet) since such discrepancies on my drives.
     
  7. dld

    dld Registered Member

    Joined:
    May 6, 2005
    Posts:
    480
    You're right on. My Computer\Properties gives 26,915,721,216 bytes used. Stupid of me not to have checked that out.

    I'm learning from the expert. I didn't realize there would be so much information over and above the files.

    As for dir/s/-p command, I'm afraid that didn't work for me. I am in the root of the c: directory when I type that command.

    Thanks Howard
     
    Last edited: Jan 6, 2006
  8. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    That's OK.
    Such comments force me to look at the code, almost always finding a way to improve the code. The latest version is now 3.0.0.2.

    This type of program leaves little chance for error, as all it is doing is making API calls and either displayig or adding up the results returned. So unless I choose the wrong data type for a calculation, it is very, very unlikely that the numbers are incorrect.

    I could have included the byte totals for directories, but did not feel that would be useful.

    Most of the code changes have been to make the code tighter by:

    1. Verifying which of two API calls needs to be used to get the drive level info, this allows the code to run in vanilla windows 95.

    2. Verifying whether Excel is installed.

    3. Verifying whether the version of Excel installed is at least Excel 97.

    4. Getting around an Excel silliness in formatting. There's still one thing that does not appear to have a programmatic solution, i.e., if you have an all numeric file extension, when I display that in the list, Excel flags the item "the number in this cell is formatted as text". There may be a solution for Excel 2002 and 2003, but the solution does not work for Excel 97 and 2000.
     
    Last edited: Jan 6, 2006
  9. Menorcaman

    Menorcaman Retired Moderator

    Joined:
    Aug 19, 2004
    Posts:
    4,661
    Location:
    Menorca (Balearic Islands) Spain
    Many thanks from me too Howard (just downloaded v3.0.0.2).

    Regards
     
  10. dld

    dld Registered Member

    Joined:
    May 6, 2005
    Posts:
    480
    What got me going into the bookkeeping of GetFileTypeDistribution was to monitor the size of ATI images. Would it be possible to get the totals for individual tib files? Assuming the "overhead" stays fairly constant from one image to the other, and assuming the same compression level for each image, one could then get a good picture of the size of ATI images. Or are the results given by My Computer good enough for all practical purposes?
     
  11. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    I could add an option to output info for each file individually, but such info is easily obtained by:

    1. Open a command prompt window.
    2. CD to wherever you want to start.
    3 enter
    Code:
    dir/s/-p > YourReport.text
    
     
  12. dld

    dld Registered Member

    Joined:
    May 6, 2005
    Posts:
    480
    Works! Thanks again. :thumb:

    Volume in drive S has no label.
    Volume Serial Number is 910E-7970

    Directory of S:\

    01/06/2006 09:11 AM 0 Report.text
    01/05/2006 09:55 AM 8,949,597,696 TIDesktopBackupSetA.tib
    01/03/2006 11:25 AM 8,948,944,384 TIDesktopBackupSetB.tib
    01/04/2006 07:46 AM 8,948,486,144 TIDesktopBackupSetC.tib
    4 File(s) 26,847,028,224 bytes

    Total Files Listed:
    4 File(s) 26,847,028,224 bytes
    0 Dir(s) 6,890,143,744 bytes free
     
  13. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.