| ##### Command line control

Welcome to DROID |  |

DROID can be controlled via the the command line. It is a little more limited than the full control offered by the graphical user interface (GUI). Only a single filter can be specified via the command line to apply to profiles for export or reporting, whereas in the GUI, each profile can have a separate filter.

Command line control allows DROID to be scripted into batch processes or automated work-flows. The following following command-line options are available:

- General options
- Profiles
- Filtering
- Exporting
- Reporting
- No-profile mode
- Signatures

Command line usage does not currently allow all operations to be combined in a single command-line. Some options simply print information to the screen, such as the version of DROID. For the others, you can create new profiles and save the results in one step. To filter, report or export a profile requires a second step, opening a previously saved profile to process.

## General

### -h, --help

Display this help. More help is available using the help menu in the graphical user interface.

### -v, --version

Displays the version of the DROID software.

### -q, --quiet

DROID will limit its console output to the requested information and errors only. Errors will be sent to the standard error output of the console.

### -R,--recurse

Recurse into all subfolders of any folder specified using the –a or -Nr option. This means that the contents of all sub-folders of the original folder will be processed, and any sub-folders in them, and so on.

If this option is not specified, only the files directly under a folder will be processed. If –R is specified, files in all sub-folders (and their sub-folders, and so on) will be processed as well. Note that in the Graphical User Interface, processing sub-folders is the default setting.

For example:

droid –R –a “C:\Files\Another Folder”–p “C:\Results\result3.droid”

## Profiles

### -a,--profile-resources <resources...>

Adds resources to a new profile and runs it. Resources are the file path of any file or folder you want to profile. The file paths should be given surrounded in double quotes, and separated by spaces from each other. The profile results will be saved to a single file specified using the –p option. For example:

droid –a “C:\Files\A Folder” “C:\Files\file.xxx” –p “C:\Results\result1.droid”

Note: You cannot use reporting, filtering and exporting when using the –a option.

### -p,--profile <filename ...>

When used in conjunction with reporting, filtering or exporting, -p specifies a list of profiles to open. The file paths of the profiles should be given surrounded in double quotes, and separated by spaces from each other. When used in conjunction with the –a option, the results of the new profile will be saved to that file, and you can only specify a single file. For example:

droid –p “C:\Results\result1.droid” “C:\Results\result2.droid” –e “C:\Exports\combinedResults.csv”
droid –a “C:\Files\A Folder” “C:\Files\file.xxx” –p “C:\Results\result1.droid”

## Filtering

### -f, --filter-all <filter ...>

Filter all the profiles specified using the –p option. Only results which match ALL filter criteria specified will appear. Filter criteria are specified using the following method:

“<field> <operator> <values>”

where <field> is the name of a filterable field, <operator> is the type of comparison to use, and <values> are the value or values against which the field value should be compared. The –k option provides information on the available fields and operators. You can specify more than one filter criteria, surrounded in double quotes and separated by spaces from each other. For example:

droid –p “C:\Results\result3.droid” –f “PUID any_of fmt/111 fmt/112” –e “C:\Exports\filteredResults.csv”
droid –p “C:\Results\result1.droid” “C:\Results\result2.droid” –f “file_size > 0” –e “C:\Exports\filteredCombinedResults.csv”
droid –p “C:\Results\result1.droid” –f “extension_mismatch = 'true'" –e “C:\Exports\mismatchedResults.csv”

### -F, --filter-any <filter ...>

Filter profiles as the –f option does, except results which match ANY of the specified filter criteria will appear.

### -k, --filter-fields

Lists the available fields to use in filters and the operators which can be used with them.

## Exporting

### -e, --export <filename>

Export the specified profiles as a single CSV file, with one row for each file profiled. This means that if a file has multiple identifications, only a single row for that file will be written out, with the identifications added as additional columns at the right of the row. If any filters are specified, then they will apply to the exported file. For example:

droid –p “C:\Results\result1.droid” “C:\Results\result2.droid” –e “C:\Exports\combinedResults.csv”
droid –p “C:\Results\result3.droid” –f “PUID any_of fmt/111 fmt/112” –e “C:\Exports\filteredResults.csv”

### -E, --export <filename>

Export the specified profiles as a single CSV file, with one row for each format for each file profiled. This means that if a file has multiple identifications, then a separate row will be written out for each file and separate identification made. If any filters are specified, then they will apply to the exported file. For example:

droid –p “C:\Results\result1.droid” “C:\Results\result2.droid” -E “C:\Exports\combinedResults.csv”
droid –p “C:\Results\result3.droid” –f “PUID any_of fmt/111 fmt/112” –E “C:\Exports\filteredResults.csv”

## Reporting

### -n, --report-name <report name>

Runs the report with the specified name on any profiles opened using the –p option. If any filters are specified, then they will apply to all the profiles specified to report against. For example, this command would load the profile from the "C:\Results\result1.droid" file, run the "File count and sizes" report, and save the results to a PDF file: "C:\Reports\result1Report.pdf":

droid –p “C:\Results\result1.droid” –n “File count and sizes” –r “C:\Reports\result1Report.pdf”

### -t, --report-output-type <output type>

Sets the output file format of the generated report. If not specified, reports default to writing out as a PDF file. For example, this command would would load the profile from the "C:\Results\result1.droid" file, run the "Comprehensive Breakdown" report, and save the results in Planets XML format to the file: "C:\Reports\result1Report.xml":

droid –p “C:\Results\result1.droid” –n “Comprehensive breakdown” -t "Planets XML" –r “C:\Reports\result1Report.xml”

### -r, --report <filename>

Saves the report generated to the file specified. For example, this command would would load the profile from the "C:\Results\result1.droid" file, run the "Total unreadable files" report, and save the results in DROID XML format to the file: "C:\Reports\result1Report.xml":

droid –p “C:\Results\result1.droid” –n “Total unreadable files” -t "DROID Report XML" –r “C:\Reports\result1Report.xml"

### -l, --list-reports <filename>

Lists the available reports, and the output formats each report can be saved in. For example:

droid –l

## No-profile mode

'No-profile' mode provides a mechanism to use DROID without the overhead of it starting up a database to store intermediate results for reporting.

### -Nr, --no-profile-resource <folder or file>

Identify either a specific file, or all files in a folder, without the use of a profile. The file or folder path should be bounded by double quotes. The scan results will be sent to standard output. For example:

droid -Nr "C:\Files\A Folder"

### -Ns, --signature-file <filename>

Specify the signature file to be used for identification. This must be used each time no-profile mode is called.

droid -Nr "C:\Files\A Folder" -Ns DROID_SignatureFile_V65.xml

### -Nc, --container-file <filename>

[optional] The container signature file to be used for identification. If omitted, container-format files may be identified by container type only.

For example:

droid -Nr "C:\Files\A Folder" -Ns DROID_SignatureFile_V65.xml -Nc container-signature-20120828.xml

### -Nx, --extension-list <extensions>

[optional] Only identify files with the given extensions

For example:

droid -Nr "C:\Files\A Folder" -Ns DROID_SignatureFile_V65.xml -Nc container-signature-20120828.xml -Nx csv jp2

### -A, --open-archives

[optional] Open archive (zip, tar, gzip) files and identify all their contents.

### -W, --open-webarchives

[optional] Open web archive (arc, warc) files and identify their contents. Usually used in conjunction with -A.

## Signatures

### -c, --check-signature-update

Check for signature updates, but does not download them.

### -d, --download-signature-update

Download the latest signature updates, if a newer version is available.

### -X, --list-signature-files

Lists all locally available signature files.

### -x, --display-signature-file

Displays the current default signature file.

### -s, --configure-signature-file <version>

Sets the current default signature file version. For example:

droid –s 42

Welcome to DROID |  |

######