Double Commander

2.16. Command line

Content

1. Presentation
2. Possible parameters
3. Examples

1. Presentation

When launching Double Commander executable we may specify some command line parameters to customize our start up.

For example, we may specify the directories that will be displayed in the file panels.

There are some switches that may be used as well.

These switches are NOT case sensitive.


Here is a summary description of the syntax of what's possible in the command line:

doublecmd.exe [-C] [-T] [-P L|R] [path1\subpath1] [path2\subpath2]


An alternative form is also possible like this one:

doublecmd.exe [-C] [-T] [-P L|R] [-L path1\subpath1] [-R path2\subpath2]


Note: macOS command line has a some specificity, use the open command with the full application name ("Double Commander" with -a) and --args to pass parameters. For the second and subsequent instances, add -n.

2. Possible parameters

Here is the list of what may be present as parameters when launching Double Commander.

Command Line Parameters
ParameterDescription
path1\sub1 [path2\sub2]
(no switches, directly a path)
If one path passed then load it into the active panel.
If two paths are passed then load first path into left panel and second in the right panel.
Directory names containing spaces must be put in double quotes.
Always specify the full path name.
-C or --client
If Double Commander is already running, activate it and pass the path(s) in the command line to that instance.
-L directory
Set directory to show in the left panel.
-R directory
Set directory to show in the right panel.
-P L|R
Sets the active panel when program starts:
  • -P L for left
  • -P R right
-T
Opens the passed directory(ies) in new tab(s).
--config-dir=path
Set custom directory path with DC configurations files.
--servername=x
Sets the name of the instance (server) DC, which can then be used to pass parameters.
If there is no already existing instance, then create it.
If there is already existing instance, and the current one is a client, then send params to the server (i.e. to the existing instance).
If there is already existing instance, and the current one is not a client, (i.e. Allow only one copy of DC at a time is false and no --client/-c options were given), then user-provided servername is altered: firstly, just add a trailing number "2".
If there is already some trailing number, then increase it by 1, until we found a servername that isn't busy yet, and then create instance with this servername.
--no-splash
Disables the splash screen at startup DC.
--debug-log=file
Running Double Commander with sending the debug output to the specified file.
Also used module (Lazlogger) supports the environment variable xxx_debuglog, where xxx is the program file name without extension: in this case, it will be doublecmd_debuglog. If this environment variable exists, the file specified in its value will be used.
In Linux, it is preferable to use running in a terminal and redirecting the output to a file (both streams, stdout and stderr).

Note: If the full file name is specified instead of the directory, Double Commander will open the folder and move the cursor to this file.

3. Examples

Here is a few examples of wanted behaviors that could be done via command line parameters when launching Double Commander.


Open the directory e:\Xilinx\ISE DS in the left panel and the directory c:\temp in the right one:

doublecmd.exe "e:\Xilinx\ISE DS" c:\temp

Open directory c:\Logs in a new tab in the active panel of and already running instance of Double Commander:

doublecmd.exe -c -t c:\Logs

Start application with configuration files from directory f:\Documents\DC\Job Settings with the mention JOB in the title bar of application:

doublecmd.exe --config-dir="f:\Documents\DC\Job Settings" --servername="JOB"

Example of command line

Valid HTML 4.0 Transitional CSS Valid!