Command Line Parser

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Command Line Parser

SpaceObServer ships with a separate command line parser named "SpaceObServerCmdLineParser.exe". The parser accepts command line options which allow you to export scans in many different export types.
 

SpaceObServerCmdLineParser.exe [/NOGUI] [/BARCHART filename] [/PIECHART filename] [/TREEMAP filename] [/EXCEL filename] [/EXPAND (level|xMB)] [/EXTENSIONSLIST filename] [/FILEAGESCHART filename] [/SIZEDISTCHART filename] [/FILTER "muster1;muster2;..."] [/HTML filename] [/HISTORYCHART filename] [/PRINT] [/SAVE filename] [/SIZEUNIT N] [/TOPFILESLIST filename] [/DUPLICATESLIST filename] [/USERSLIST filename] [/XML filename] Directory
 

/APPENDTOFILES <value>

With this option, you can select whether or not SpaceObServer should append its output to existing files when doing an export, e.g. when using /EXCEL. Select "True" to append and "False", if you want to overwrite existing files.

When exporting to an Excel file via /EXCEL, this parameter can be used together with /SHEETNAME to append the data to the specified sheet. Example:

SpaceObServerCmdLineParser.exe /APPENDTOFILES True /EXCEL "C:\Export.xlsx" /SHEETNAME "test" "C:\"

SpaceObServerCmdLineParser.exe /APPENDTOFILES False /EXCEL "C:\Export.xlsx" "C:\"

/BARCHART

Saves the bar chart of the scanned directory to a common graphic file format (bmp, gif, jpg, jpeg or png). The file type depends on the extension of the specified file name. This example creates a JPEG image of the bar chart for drive "C:\":

SpaceObServerCmdLineParser.exe /BARCHART "C:\Documents\c_bar.jpg" "C:\"

/DUPLICATESLIST

This option saves the contents of the Duplicate files list to a plain text or Excel file. This example saves the list of duplicates of the file system branch "D:\Backup" to an Excel file:

SpaceObServerCmdLineParser /DUPLICATESLIST "C:\Documents\duplicates_of_my_backups.xls" "D:\Backup\"

/EXCEL

Exports the collected data to Excel (Excel 2007 format also supported) and saves it under the given file name. If the file name already exists, the file will be opened and a new sheet will be added. The application will terminate itself after saving. Example:

SpaceObServerCmdLineParser /EXCEL "C:\Documents\c.xls" "C:\"

If the file name already exists, the file will be opened and a new worksheet will be added.

/EXPAND

This option lets you specify how many levels in the directory tree will be expanded after scanning. If you don't specify a number, all folders will be expanded. Instead of a directory level you can also indicate an amount in "MB". In this case all folders larger than the given amount will be expanded. The unit "MB" must follow the number without a blank. Examples:

SpaceObServerCmdLineParser /EXCEL "C:\Dokumente\C_upto2level.xls" /EXPAND 2 "C:\"

SpaceObServerCmdLineParser /EXCEL "C:\Dokumente\C_uptp10MB.xlsx" /EXPAND 10MB "C:\"

/EXTENSIONSLIST

This option allows you to save the statistics on file extensions of the scanned file system branch to a text or CSV file. The following example scans drive "C:\" and creates a CSV file in "C:\Documents" with the statistics of the file types on this drive:

SpaceObServerCmdLineParser /EXTENSIONSLIST "C:\Documents\C_file_types.csv" "C:\"

/FILEAGESCHART

Saves the "Age of Files" chart on the "Distributions" tab of the scanned directory to a common graphic file format. The file type depends on the extension of the specified file name. This example creates a JPEG image of the "Age of Files" chart for drive "C:\":

SpaceObServerCmdLineParser /FILEAGESCHART "C:\Documents\C_file_ages.jpg" "C:\"

/FILTER

Allows you to set a file filter so that only files with certain extensions, e.g. .MP3 or .DOC, will be counted. Multiple patterns may be passed, you can use spaces, commas or semicolons as a separator between the patterns. The following example will search for AVI and MP3 files in the users directory on the server:

SpaceObServerCmdLineParser /EXCEL "C:\Documents\MediaUsers.xls" /FILTER "*.mp3;*.avi" "\\Server\Users"

/HISTORYCHART

Saves the chart on the "History" tab of the scanned directory to a common graphic file format. The file type depends on the extension of the specified file name. This example creates a JPEG image of the bar chart for drive "C:\":

SpaceObServerCmdLineParser /HISTORYCHART "C:\Documents\C_history.jpg" "C:\"

/HTML

Saves the collected data to a HTML file which can be viewed with any HTML browser later. If you also have a /PIECHART or /BARCHART parameter in your command line, the image will be included in the HTML file. The following example will generate an HTML report for the drive "C:\" and saves it to "C:\Documents\html\C.html":

SpaceObServerCmdLineParser /HTML "C:\Documents\html\C.html" /PIECHART "C:\Documents\html\C.jpg" "C:\"

/NOGUI

No window will be shown and the application will not appear in the task bar. Useful for background scans. Caution: Use this switch only if you have tested the rest of the command line options because error messages cannot be displayed in this mode. However, it tries to log errors in the event log of Windows. Use this switch always as the first command line option.

/PIECHART

Saves the pie chart of the scanned directory to a common graphic file format. The following example will export the pie chart of the drive "C:\" in PNG format:

SpaceObServerCmdLineParser /PIECHART "C:\Documents\c_pie.png" "C:\"

/PRINT

Prints a report for the scanned folder to the default printer. The application will be terminated after printing. Usage example:

SpaceObServerCmdLineParser /PRINT "C:\"

/SAVE

Saves the results to a text or CSV file. The application will terminate itself after saving. This example will save information of the scanned drive "C:\" to an CSV file:

SpaceObServerCmdLineParser /SAVE "C:\Documents\c.csv" "C:\"

/SIZEDISTCHART

Saves the "Size Distribution" chart on the "Distributions" tab of the scanned directory to a common graphic file format. The file type depends on the extension of the specified file name. This example creates a bitmap image of the "Size Distribution" chart for drive "\\Server1\Share1":

SpaceObServerCmdLineParser /FILEAGESCHART "C:\Documents\size_distribution.bmp" "\\Server1\Share1"

/SIZEUNIT <Unit>

This option can be used to specify the unit that should be used for displaying size values. Accepted units are "Byte", "KB", "MB", "GB", "TB" and "Mixed" (automatic unit). Without this option the value will be used that was set the last when SpaceObServer was used.

/TOPFILESLIST

This option allows saving the contents of the Top Files list to a text file. This example saves the top 100 files of the scanned drive "C:\" to a text file:

SpaceObServerCmdLineParser /TOPFILESLIST "C:\Documents\C_top_files.txt" "C:\"

/USERSLIST

This option allows you to save the statistics showing the results grouped by username to a plain text or Excel file. The following example scans drive "C:\" and creates an Excel 2007 formatted file in "C:\Documents" with the statistics of the users on this drive:

SpaceObServerCmdLineParser /USERSLIST "C:\Documents\C_users.xlsx" "C:\"

/XML

Saves the scanned drive "C:\" to a XML file that can be loaded again later and can be used for comparisons with exports of TreeSize Professional.

SpaceObServerCmdLineParser /XML "C:\Documents\c.xml" "C:\"

The "SpaceObServerCmdLineParser.exe" uses the OLE Automation interface of SpaceObServer. You can find the source code of this application (Delphi) in the installation sub folder "Demos" ("SpaceObServerCmdLineParser.dpr").