# DOpusRT Reference

DOpusRT is a separate program (**dopusrt.exe**) that performs various support functions for Directory Opus:

* If [Double-click on the desktop](../preferences/preferences_categories/launching_opus/launching_opus_from_the_desktop) is enabled, it runs in the background on startup to detect double-clicks and launch Opus when it's not already running.
* If [Explorer Replacement](../basic_concepts/explorer_replacement) mode is enabled, it is used as the default "handler" when opening a folder (and again, it can launch Opus when not already running).
* You can use it to run internal commands from outside of Opus.
* You can use it to display a picture with the standalone viewer from outside of Opus.
* You can use it to manipulate [file collections](../basic_concepts/virtual_file_system/file_collections) from outside of Opus.
* You can use it to [retrieve information about currently displayed folders and files](dopusrt_reference/retrieving_file_and_folder_information) from outside of Opus.

The program **dopusrt.exe** is located in the main Opus program folder (normally _C:\Program Files\GPSoftware\Directory Opus_). Note that if you are invoking DOpusRT from an Opus button or hotkey, you don't need to use the full path - you can use the **dopusrt** keyword as a shortcut for the actual location of the .exe. Otherwise, you would normally need to specify the full path of the command when using it (for example, in a shortcut or a batch file). In the examples below, the full path is omitted for clarity.

The DOpusRT command line consists of a _command_ followed by _arguments_ appropriate to that command. For completeness, all **dopusrt.exe** commands are listed here - but many are designed to only be used by Opus itself. The commands you will most probably be interested in are are **/cmd** and **/col**.

| Command                    | Arguments                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| -------------------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **/acmd**                  | _\<command and arguments>_ | <p>Invokes an Opus command from outside of Opus. If one or more Opus listers are open, the command is sent to the one which is, or was most recently, the active window. Equivalent to <code>/cmd:active</code>.</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /acmd Go "C:\Program Files"</code></p><ul><li><em>navigates to "C:\Program Files" in the last-active window (or in a new window if there isn't one)</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **/argsmsgbox**            | _(no arguments)_           | <p>Displays any remaining arguments in a message box. This can be useful when you wish to see the exact command-line that an Opus command is generating when calling an external command.</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /argsmsgbox Hello World</code></p><ul><li><em>display "Hello World" in a message box</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **/argstoclip**            | _(no arguments)_           | <p>Puts any remaining arguments into the clipboard. As with <strong>/argsmsgbox</strong>, this can be useful for checking what Opus would pass to an external command.</p><p>Note that Opus has a built-in <a href="https://github.com/Chaoses-Ib/DirectoryOpus/blob/main/Manual/reference/dopusrt_reference/command_reference/internal_commands/clipboard.md"><strong>Clipboard</strong></a> command which is a better choice if you just want to put some text or filenames into the clipboard.</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /argstoclip Hello World</code></p><ul><li><em>put "Hello World" into the clipboard</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **/changelanguage**        | _\<language>_              | <p>Changes the user-interface language. Opus will restart, and toolbars and menus will be translated (if possible).</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /changelanguage deutsch</code></p><ul><li><em>change language to German</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **/cmd\[:**_**type**_**]** | _\<command and arguments>_ | <p>Invokes an Opus command from outside of Opus.</p><p>If no <em>type</em> parameter is specified, and one or more Opus Listers are open, the command is sent to the Source window.</p><p>The optional <em>type</em> parameter accepts the following keywords:</p><ul><li><strong>active</strong> - sends the command to the currently (or most recently) active Lister (equivalent of <strong>/acmd</strong>)</li><li><strong>active,thisdesktop</strong> - looks for the active Lister, but only on the current virtual desktop</li><li><strong>viewer</strong> - sends the command to the currently (or most recently) active image viewer (equivalent of <strong>/vcmd</strong>)</li></ul><p><em>Examples:</em></p><p><code>dopusrt.exe /cmd Go C:\ NEW=0,0,640,480</code></p><ul><li><em>opens a new Lister showing C:\ at the specified coordinates</em><br><code>dopusrt.exe /cmd:active Go "C:\Program Files"</code></li><li><em>navigates to "C:\Program Files" in the last-active window (or in a new window if there isn't one)</em><br><code>dopusrt.exe /cmd:viewer Show VIEWERCMD=selectall</code><br>- <em>selects the image in the currently active viewer</em></li></ul> |
| **/col**                   | _\<collection command>_    | <p>Lets you manipulate file collections from outside of Opus. See the <a href="dopusrt_reference/external_manipulation_of_file_collections">External Manipulation of File Collections</a> page for more information.</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /col create "Holiday Photos"</code></p><ul><li><em>creates a collection called 'Holiday Photos'</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **/dblclk**                | _(no arguments)_           | <p>Runs in the background to manage the double-click on the desktop feature.</p><p>You do not need to run this command manually - Opus starts it automatically when the desktop double-click option is enabled.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|                            | **=off**                   | <p>Deactivate a running double-click manager. You can use this command if you want to temporarily disable the desktop double-click feature (rather than using Task Manager to kill the <strong>dopusrt.exe</strong> instance).</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /dblclk=off</code></p><ul><li><em>shuts down the double-click on desktop handler</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **/dde**                   | _(no arguments)_           | <p>Run a DDE server to listen for DDE commands relating to opening folders.</p><p>This is used in Explorer Replacement mode when you double-click on a folder. You do not need to run this command manually.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **/delay**                 | \*\*_=_\<seconds>\*\*\*\*  | <p>Only valid after <strong>/dblclk</strong>. Causes the desktop double-click functionality to wait the specified number of seconds before setting itself up. This can be used to work around conflicts with other software that will break desktop double-click if it starts later in the Windows boot cycle.</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /dblclk /delay=10</code></p><ul><li><em>waits 10 seconds before desktop double-click initializes</em> You do not normally need to use this argument yourself, but may see it in the registry. You can specify a delay via Preferences when configuring desktop double-click.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **/flushplugins**          | _(no arguments)_           | <p>Flush viewer plugins from memory. If Opus is running, any plugins not currently in use will be unloaded. You can use this if you are developing a plugin and want to replace the DLL file without having to quit Opus.</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /flushplugins</code></p><ul><li><em>flushes unused viewer plugins</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **/help**                  | _\<help path>_             | Displays the specified document from the local help in your web browser. This is used to implement the **opushelp://** URL scheme, which Opus registers when it's installed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **/info**                  | _\<information command>_   | <p>Lets you retrieve information about the currently displayed folders and files from outside of Opus. See the <a href="dopusrt_reference/retrieving_file_and_folder_information">Retrieving File and Folder Information</a> page for more information.</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /info path_list.txt,paths</code></p><ul><li><em>creates an XML file (path_list.txt) listing the currently displayed paths in all currently open Listers</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **/open**                  | _\<folder path>_           | <p>Opens a new Lister showing the specified path.</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /open "C:\Program Files"</code></p><ul><li><em>open a Lister showing the C:\Program Files folder</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **/restart**               | _(no arguments)_           | <p>Restarts Opus if it is already running. If Opus is not already running it will be started.</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /restart</code></p><ul><li><em>restarts or launches Opus</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|                            | **:norun**                 | <p>Restarts Opus if it is already running, but does not start it if it is not running.</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /restart:norun</code></p><ul><li><em>restarts Opus if it's already running</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **/runopus**               | _(no arguments)_           | <p>Starts Opus if it is not already running. Under Vista and above, this will always launch Opus as non-elevated, even if the process invoking <strong>dopusrt.exe</strong> is elevated.</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /runopus</code></p><ul><li><em>runs Opus (non-elevated) if not already running</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **/runstd**                | _\<command line>_          | <p>Lets you launch another program. Under Vista and above, this will run the specified command as non-elevated, even if the process invoking <strong>dopusrt.exe</strong> is elevated (this is really the only point of this command).</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /runstd notepad.exe</code></p><ul><li><em>runs notepad.exe as non-elevated</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **/show**                  | _\<filename>_              | <p>Shows the specified file using the Opus <a href="../additional_functionality/viewing_images">standalone viewer</a>. You could use this to make the Opus viewer the default system image viewer for a file type.</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /show %1</code></p><ul><li><em>shows the selected image (definition for context menu item)</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **/vcmd**                  | <_command and arguments_>  | <p>Invokes an Opus command from outside of Opus, in the context of the currently (or most recently) active image viewer. If no image viewers are open the command will be ignored. Equivalent to <code>/cmd:viewer</code>.</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe /vcmd Show VIEWERCMD=selectall</code></p><ul><li><em>selects the image in the currently active viewer</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| _\<filename>_              | _(no arguments)_           | <p>DOpusRT can be called with the name of an external file to launch various Opus files. This behaviour is used by the default file type associations that Opus creates - for example, a <strong>.dcf</strong> file (an Opus command file, created by dragging a toolbar button to the desktop in Customize mode) is launched by passing its filename to <strong>dopusrt.exe</strong>.</p><p>The file types that can be invoked in this way are <strong>.dcf</strong> (command files), <strong>.dpf</strong> (exported Preferences files from older versions of Opus) and <strong>.dop</strong> (toolbars).</p><p>//<a href="example://">Example://</a></p><p><code>dopusrt.exe C:\Commands\NewLister.dcf</code></p><ul><li><em>executes the command in the exported command file</em></li></ul>                                                                                                                                                                                                                                                                                                                                                                                          |

More:

[External Manipulation of File Collections](dopusrt_reference/external_manipulation_of_file_collections)\
[Retrieving File and Folder Information](dopusrt_reference/retrieving_file_and_folder_information)
