Agent Ransack's start up values can be altered through information passed through the command line. If an output file is specified then the actual User Interface is not displayed and the results are streamed directly to the file.
The available command line options are:
AgentRansack.exe [saved search] | -o [output file] | -of? | -oa | -d [folder name] | -c [containing text] | -f [file name] | -cm | -fm | -s | -fd | -fx | -cr | -pa | -po | -ma [datetime] | -mb [datetime] | -h | -?
|
-c
|
Text to search for in specified files (i.e. the Containing Text field)
|
|
-ce?
|
Contents expr type: -ceb=Boolean, -cex=Regular Expression
|
|
-cm
|
Match case when contents searching
|
|
-d
|
Directory(s) to search (i.e. the Look In field), use -dw for current working directory
|
|
-f
|
File names to search for
|
|
-fe?
|
File name expr type: -fed=DOS, -fex=Regular Expression
|
|
-fm
|
Match case when comparing file names
|
|
-fx
|
File name shows the file names to exclude
|
|
-ma
|
Modified after date value, pass "now" as the date to use the current date and time
|
|
-mb
|
Modified before date value, pass "now" as the date to use the current date and time
|
|
-o
|
Output filename (runs the search without showing the Agent Ransack GUI streaming results directly to the file)
|
|
-oa
|
Append to output file
|
|
-oc
|
Output content lines
|
|
-oe?
|
Output encoding: -oea=ASCII, -oe8=UTF-8, -oeu=Unicode, -oe8nb=UTF8 (no BOM), -oeub=Unicode (big endian)
|
|
-of?
|
Output format: -oft = Text (default), -ofc = CSV, -ofb = Tab
|
|
-pa
|
Always use command line parameters when creating new or opening existing searches
|
|
-pc
|
Overwrite configuration with configuration stored in saved search criteria file.
|
|
-po
|
Override values from file when loading from file AND specifying command line parameters
|
|
-r
|
Start search immediately (implied by -o option)
|
|
-resetui
|
Resets the user interface to the default size and position, ie toolbars, menu, docked windows etc. are reset to the installation defaults.
|
|
-s
|
Search subfolders
|
|
|
|
|
-h or -?
|
Show the help dialog
|
|
|
|
|
|
|
To switch an option off append 'n' to the flag, e.g.
AgentRansack.exe -fmn Switches OFF match case when comparing files
Examples:
To launch Agent Ransack with the Look In field pre-filled with "C:\Documents and Settings\user\My Documents" the command line arguments would be:
AgentRansack.exe -d "C:\Documents and Settings\user\My Documents"
To run a search looking for files that match *.sys in the folder C:\WINDOWS without launching the usual user interface but instead streaming the results directly to an output file the command line arguments would be:
AgentRansack.exe -d "C:\WINDOWS" -f "*.sys" -o "c:\temp\results.txt"
To launch Agent Ransack with Search subfolders switched off and Match case on contents searching switched on the command line arguments would be:
AgentRansack.exe -cm -sn
|