Here is a simple example (VBScript) of how to use the OLE Automation interface of SpaceObServer to generate an Excel export of a scanned share:
' Declare constants |
|
' Declare variables
Dim SOS
' Initialize variables
Set SOS = CreateObject("SpaceObServer.Application")
SOS.ROOTDirectory = "\\Server1\Share1\" |
'Use the scanned share "\\Server1\Share1\" as root directory |
SOS.SizeUnit = "MB" |
'Set the unit type for size values to "MB" |
SOS.ExpandToLevel 2 |
'Expand the root directory to the second level |
SOS.Sorttype = ALLOC_SPACE_SORT_TYPE_ID |
'Sort the exports by "allocated space" |
'Export tree to Excel
SOS.ExcelExport "C:\SpaceObServer_Exports\excelexport.xls", "SpaceObServer %DATE% %TIME%", True, False, False, False
Please find several code examples in different programming languages in the subdirectory "Demos" of your SpaceObServer installation directory.
Each example is explained in the "readme.txt" located in the "Demos" directory.