FAQ & Knowledge Base

Welcome to our Knowledge Base. Search or browse through the topics below to find answers to your questions.

Categories: TreeSize | Show all categories

Automated size growth reports

Question / Problem

We would like to automate a report that shows the size growth since the last scan.
Is it possible to schedule a comparison, using a saved scan (XML)?

Answer / Solution

TreeSize is basically designed to visualize the current state of your storage, but it can also compare these results with previously exported ones to calculate the changes inbetween.

Starting with v9.0, you can use exports to the SQLite format for this. You can configure the task in the task scheduler, or run it from a command line. E.g. if you want to scan D:, compare it with an older scan, export the results of the comparison to HTML, and update the older scan, you could just call:

START /WAIT "TreeSize" Treesize.exe /COMPARE C:\Scan_D.SQLite /SQLITE "C:\Scan_D.SQLite" /HTML C:\Compared_D.html D:\

If you want to compare information on folder level only, you can also use the XML format. Doing so requires several steps though, combined in a batch script:

  1. Perform the scan of the path and export the scan to an XML file using the /XML command line parameter.
  2. Perform a compare of the scan from the step before with a previous one, using the command line parameter /COMPARE and export the results in an appropriate format
  3. Replace the XML file that represents an older scan with the current one, so that it can be used for the next run.

A batch file for drive D:\ could look like this:

START /WAIT "TreeSize" TreeSize.exe /XML "C:\New_D.xml" D:\
START /WAIT "TreeSize" TreeSize.exe /OPEN "C:\New_D.xml" /COMPARE "C:\Old_D.xml" /HTML "C:\Compared_D.html"
DEL "C:\Old_D.xml"
MOVE "C:\New_D.xml" "C:\Old_D.xml"

Our disk space manager SpaceObServer offers features like this out-of-the box, as it stores historic disk space data in a SQL database.