Sally: Other Tasks

Starting Sally with Parameters

Sally supports command-line parameters for opening directories or focusing files, choosing a configuration and running a startup action. Named profiles and the -DO startup actions are available from Sally 1.0.37.

Syntax

SALLY.EXE [-L path] [-R path] [-A path] [-C reg_file] [-I icon_index] [-T title_prefix] [-O] [-P panel_index] [-PROFILE name] [-DO action ...]

Switch names are not case-sensitive. Put paths or values containing spaces in double quotes. To request several actions, repeat the whole switch, for example -do view -do edit.

Parameter Description
-L pathSpecifies the path for the left panel. It works with full or relative disk paths, archive paths, and plugin file system paths.
-R pathSpecifies the path for the right panel. It works with full or relative disk paths, archive paths, and plugin file system paths.
-A pathSpecifies the path for the active panel. It works with full or relative disk paths, archive paths, and plugin file system paths. This parameter is ignored when the -L or -R parameter is specified.
A path given to -L, -R or -A may name a file: the panel then opens the file's folder with the file focused, for example sally.exe -l C:\Photos\beach.jpg.
-C reg_fileSpecifies the exported configuration that will be imported to the registry before loading configuration from the registry. If you do not specify the full path to the configuration file, Sally searches for it in the installation directory and, in Vista or later, also in the application data directory (typically C:\Users\<user>\AppData\Roaming\Sally)
-I icon_indexSpecifies the application-window icon color for this launch. The accepted values are 0 (default red), 1 (red), 2 (green), and 3 (classic orange). Blue is also available in Configuration/Appearance; select it there rather than using a command-line index.
-T title_prefixSpecifies the text prefix displayed in the title bar of the main window. To suppress the text prefix, use the "" parameter. You can also change the prefix in configuration of main window.
-OSally will behave as if the Allow only one instance of Salamander at one time option is checked. This does not change the stored configuration value.
-P panel_indexSpecifies the panel that will be activated. 0 means the default panel, 1 means the left panel, and 2 means the right panel.
-DO actionOnce Sally has started and its panels are set, does action on the focused item of the active panel, as its menu command does: view (F3) or edit (F4). Repeat -DO for several actions, done in order. Example, to look at a picture at once: sally.exe -l C:\Pictures\beach.jpg -p 1 -do view
-PROFILE nameStarts Sally with a configuration of its own, named name (letters, digits, ., _ and -, up to 64 characters), kept apart from your usual one. A new name starts with Sally's default settings; the same name again finds the same settings. Your usual configuration is not read, changed or offered for import, so a profile is a clean Sally for trying a setting or a new release. The name is shown at the start of the window title (unless -T sets another text). The settings are in the registry under HKEY_CURRENT_USER\Software\Sally\Profiles\name; delete that key to remove the profile. Example: sally.exe -profile test

Startup actions and the single-instance setting

The supported startup actions are view and edit. Each uses your configured viewer or editor for the focused item; an unknown action name is an error. Choose the left panel with -P 1 or the right panel with -P 2 when the command targets a particular panel.

Startup actions run when a new Sally instance starts. If -O or the single-instance setting hands the paths to an already running instance, the startup actions are not passed to that window. The single-instance setting also does not distinguish named profiles: it can activate an existing window that uses another profile.

Sally's updater

utils\salupdate.exe, Sally's updater, has switches of its own: a release .zip to install, --yes, --install, --check, --whats-new, --auto, --feed and --report. They are described in Installing and Updating Sally.

Examples

Open a picture immediately in its configured viewer:

sally.exe -l "C:\Pictures\beach.jpg" -p 1 -do view

Open a document in its configured editor:

sally.exe -r "C:\Documents\notes.txt" -p 2 -do edit

Try the viewer using a separate profile; the next launch with preview reuses that profile:

sally.exe -profile preview -l "C:\Pictures\beach.jpg" -p 1 -do view