### Command line

This text is intended to experienced users.

Siren is not a console application. Just some tasks have been automated.

Command line parameters allow the initialisation of some user interface elements and the execution of tasks like starting a renaming, a copy or quitting the program.

Each of them comes in short and long forms. Here is the list :

Short |  | Long |  | Description
`-v` |  | `--version` |  | print version information
`-h` |  | `--help` |  | show this help message
`-d` |  | `--dir` |  | the next parameter is the directory to load
`-f` |  | `--filter` |  | the next parameter is the loading filter
`-s` |  | `--select` |  | the next parameter is the selection filter
`-x` |  | `--listhidden` |  | list hidden directories and files
`-t` |  | `--subdir` |  | force the loading of sub directories
`-e` |  | `--expression` |  | the next parameter is the renaming expression
`-F` |  | `--favname` |  | the next parameter is the name of a favourite expression
`-r` |  | `--rename` |  | execute a rename operation
`-c` |  | `--copy` |  | execute a copy operation
`-q` |  | `--quit` |  | quit after rename/copy execution
`-l` |  | `--language` |  | the next parameter is the language (en, en_US, fr_FR ...)
`-p` |  | `--paramfile` |  | the next parameter is name of the configuration file
`-P` |  | `--nosaveparam` |  | don't save configuration parameters (directories, expressions, preferences ...)

All the others are considered as full file names to select.

A few reminders :

- If a parameter contains characters like : space, ampersand ... it must be surrounded with quotation marks (`'"'`)
- If it contains quotation marks (`'"'`), it's necessary to put a backslash (`'\'`) in front of them
- Under Windows, in a batch program, the `'%'` have to be doubled

For example, the expression : `%b("_"," ").%e`
becomes for a "direct usage" : `"%b(\"_\",\" \").%e"`
and in a Windows batch program : `"%%b(\"_\",\" \").%%e"`

Run :

- Under Windows, in a batch program, launch Siren with the command :
  `"start /wait"`
- If an error occurs, a message box is displayed
- No specific exit code
- No writing on standard output

Some advice :

- When possible, limit "escaping" quotation marks (`"`) by using quotes (`'`)
- For a complicated expression, use a favorite (`"-F"`) rather than an expression (`"-e"`)
- Write the command line in stages : parameter after parameter ending with `"-r"` (or `"-c"`) and `"-q"`
- Use the file filter parameter (`"-f"`) to limit the number of unnecessarily analysed files