Using Command Line Utility

In addition to the DiskSorter GUI application, DiskSorter Ultimate and DiskSorter Server include a command line utility allowing one to execute file classification operations from an OS shell window. The DiskSorter command line utility provides IT and storage administrators with the ability to integrate file classification capabilities into batch files and shell scripts. The DiskSorter command line tool is located in <ProductDir>/bin directory.

Command Line Syntax:

disksorter -execute <Profile Name>

Executes the specified file classification command.

disksorter -classify -dir <Directory 1> [ ... Directory X ]

Classifies files in the specified directories, disks or network shares.

disksorter -classify -server <HostName1;HostName2;HostNameX>

This command classifies files in all network shares in the specified servers and/or NAS devices.

disksorter -classify -network

This command classifies files in all servers and/or NAS storage devices on the network.

disksorter -link <Output Directory> -dir <Directory 1> [ ... Directory X ]

Classifies the specified input directories and builds an hierarchy of links in the output directory.

disksorter -copy <Output Directory> -dir <Directory 1> [ ... Directory X ]

Classifies the specified directories and copies files organized according to the selected file classification plugin to the output directory.

disksorter -move <Output Directory> -dir <Directory 1> [ ... Directory X ]

Classifies the specified directories and moves files organized according to the selected file classification plugin to the output directory.

disksorter -move_and_link <Output Directory> -dir <Directory 1> [ ... Directory X ]

Classifies the specified directories and moves files organized according to the selected file classification plugin to the output directory replacing original files with links pointing to files located in the output directpry.

disksorter -command <Command Name> -dir <Directory 1> [ ... Directory X ]

Classifies the specified directories and executes a custom command with the group/class name as an argument for each classified file.

Parameters:

-dir <Directory>

This parameter specifies an input directory, disk or a network share for the file classification command. In order to ensure proper parsing of command line arguments, directories containing space characters should be double quoted.

Options:

-save_html_report [ File Name ]

Saves an HTML file classification report to the specified file.

-save_html_summary [ File Name ]

Saves an HTML summary report to the specified file.

-save_pdf_report [ File Name ]

Saves a PDF file classification report to the specified file.

-save_pdf_summary [ File Name ]

Saves a PDF summary report to the specified file.

-save_excel_report [ File Name ]

Saves an Excel file classification report to the specified file.

-save_excel_summary [ File Name ]

Saves an Excel summary report to the specified file.

-save_text_report [ File Name ]

Saves a text file classification report to the specified file.

-save_text_summary [ File Name ]

Saves a text summary report to the specified file.

-save_csv_report [ File Name ]

Saves a CSV file classification report to the specified file.

-save_csv_summary [ File Name ]

Saves a CSV summary report to the specified file.

-save_xml_report [ File Name ]

Saves an XML file classification report to the specified file.

-save_xml_summary [ File Name ]

Saves an XML summary report to the specified file.

-save_report [ File Name ]

This option saves a file classification report to the DiskSorter native report format.

-save_to_database

This option saves a file classification report to an SQL Database through the ODBC interface configured on the DiskSorter GUI options dialog.

-title <Report Title>

This optional parameter specifies a custom report title.

-label <Report Label>

This optional parameter specifies a custom report label.

-levels <Report Levels>

This option specifies the number of class hierarchy levels to export to the report.

-files_per_class <Files Per Class>

This optional parameter specifies the number of files per class to export to the report.

-show_users

This option enables processing and display of files user names.

-perf <FULL | MEDIUM | LOW>

FULL - Full-speed file classification
MEDIUM - Medium-speed file classification
LOW - Low-speed file classification

-scanners <1 ... 16>

This option specifies the maximum number of parallel directory scanning threads.

-streams <1 ... 16>

This option specifies the number of parallel file classification threads.

-v

Shows the product major version, minor version, revision and build date.

-help

Shows the command line usage information.