Customizing User Menu

The User Menu allows you to execute external programs or open documents. The User Menu is list of individual commands ("items") you have defined. Each item contains an item name and executed command. Moreover, icon, additional arguments, initial directory, and executing flags can be specified.

You can use additional arguments to specify command-line arguments that are passed to the application each time you start it. For example you can use $(FullName) to pass the filenames of selected files (one User Menu command is executed for each selected file). See the List of Variables below for details.

To add new command to the User Menu:

  1. In the Options menu, select Configuration..., and then choose the User Menu dialog box.
  2. In the Menu Contents select the last empty row.
  3. Type the name of the created item.
  4. Press the Enter key.
  5. In the Command box, type path and filename of the file you want to execute.
  6. Choose the OK button.

Advanced Features

The User Menu supports executing of utilities for comparing/merging of files and directories. You can use special variables in the Arguments box (see the List of Variables below for details) to pass two files or two directories to the compare/merge utility. For example, enter "$(FileOrDirToCompareLeft)" "$(FileOrDirToCompareRight)" to the Arguments box and two full names of two files/directories specified in panels will be used as arguments for the compare/merge utility (specify its .exe file in the Command box). See the following list to learn how to specify two files/directories for the compare/merge utility directly in panels:

  1. select both files/directories in one panel,
  2. select first file/directory in left panel and then select second file/directory in right panel,
  3. select first file/directory and then focus the second file/directory in one panel,
  4. select first file/directory in left panel and then focus second file/directory in right panel (and vice versa),
  5. if you have files/directories with the same name in both panels, focus first file/directory in one panel and second file/directory with the same name will be taken from opposite panel.

The list of selected files and directories can be used in command arguments in the User Menu. In this case only one User Menu command is executed for all selected files and directories. See $(ListOfSelectedNames) and $(ListOfSelectedNames) variables in the List of Variables below.

List of Variables

All variables are available from context menus on buttons on the right sides of the Command, Arguments, and Initial directory boxes.

The User Menu command is executed for each selected file and directory or for the focused file or directory (if there is no selection). The file or directory for which is executed the User Menu command is called the current file or directory in the following table. Exception from this rule: if you use variables for compare/merge utilities or lists of selected files and directories, only one User Menu command is executed for all selected files and directories.

VariableDescription
$(WinDir) Full path of the Windows directory (e.g. C:\Windows\).
$(SysDir) Full path of the system directory (e.g. C:\Windows\system32\).
$(SalDir) Full path of the Altap Salamander directory (e.g. C:\Program Files\Altap Salamander 2.5\).
$[ENV_VAR] Value of environment variable (replace ENV_VAR by the environment variable name).
$(FullName) Full name of the current file or directory (e.g. C:\Program Files\Outlook Express).
$(Drive) Drive of the current file or directory (e.g. C:, D:, or \\server\share).
$(Path) Path of the current file or directory (e.g. \Windows\system32\).
$(Name) Name of the current file or directory (e.g. file.txt).
$(NamePart) Name part of the current file or directory (e.g. file if filename is file.txt).
$(ExtPart) Extension of the current file or directory (e.g. txt if filename is file.txt).
$(FullPath) Full path of the current file or directory (e.g. C:\Windows\system32\).
$(DOSFullName) Full DOS name (8.3 naming convention) of the current file or directory (e.g. C:\DOCUME~1\ALLUSE~1\APPLIC~1).
$(DOSPath) DOS path (8.3 naming convention) of the current file or directory (e.g. \DOCUME~1\ALLUSE~1\).
$(DOSName) DOS name (8.3 naming convention) of the current file or directory (e.g. APPLIC~1).
$(DOSNamePart) DOS name part (8.3 naming convention) of the current file or directory (e.g. MYFIRS~1 if filename is my first document.html).
$(DOSExtPart) DOS extension (8.3 naming convention) of the current file or directory (e.g. HTM if filename is my first document.html).
$(DOSFullPath) Full DOS path (8.3 naming convention) of the current file or directory (e.g. C:\DOCUME~1\ALLUSE~1\).
$(DOSWinDir) Full DOS path (8.3 naming convention) of the Windows directory (e.g. C:\Windows\).
$(DOSSysDir) Full DOS path (8.3 naming convention) of the system directory (e.g. C:\Windows\system32\).
$(FullPathInactive) Full path opened in the inactive (target) panel (e.g. C:\Windows\system32\).
$(FullPathLeft) Full path opened in the left panel (e.g. C:\Windows\system32\).
$(FullPathRight) Full path opened in the right panel (e.g. C:\Windows\system32\).
$(FileToCompareLeft) Full name of the first file to compare/merge (e.g. C:\file1.txt). If both files are not from the same panel, the file from the left panel is used. See the Advanced Features section above for details on executing of utilities for comparing/merging of files and directories.
$(FileToCompareRight) Full name of the second file to compare/merge (e.g. C:\file2.txt). If both files are not from the same panel, the file from the right panel is used. See the Advanced Features section above for details on executing of utilities for comparing/merging of files and directories.
$(DirToCompareLeft) Full name of the first directory to compare/merge (e.g. C:\dir1). If both directories are not from the same panel, the directory from the left panel is used. See the Advanced Features section above for details on executing of utilities for comparing/merging of files and directories.
$(DirToCompareRight) Full name of the second directory to compare/merge (e.g. C:\dir2). If both directories are not from the same panel, the directory from the right panel is used. See the Advanced Features section above for details on executing of utilities for comparing/merging of files and directories.
$(FileOrDirToCompareLeft) Full name of the first file or directory to compare/merge (e.g. C:\file1.txt). If both files or directories are not from the same panel, the file or directory from the left panel is used. See the Advanced Features section above for details on executing of utilities for comparing/merging of files and directories.
$(FileOrDirToCompareRight) Full name of the second file or directory to compare/merge (e.g. C:\file2.txt). If both files or directories are not from the same panel, the file or directory from the right panel is used. See the Advanced Features section above for details on executing of utilities for comparing/merging of files and directories.
$(FileToCompareActive) Full name of the first file to compare/merge (e.g. C:\file1.txt). If both files are not from the same panel, the file from the active (source) panel is used. See the Advanced Features section above for details on executing of utilities for comparing/merging of files and directories.
$(FileToCompareInactive) Full name of the second file to compare/merge (e.g. C:\file2.txt). If both files are not from the same panel, the file from the inactive (target) panel is used. See the Advanced Features section above for details on executing of utilities for comparing/merging of files and directories.
$(DirToCompareActive) Full name of the first directory to compare/merge (e.g. C:\dir1). If both directories are not from the same panel, the directory from the active (source) panel is used. See the Advanced Features section above for details on executing of utilities for comparing/merging of files and directories.
$(DirToCompareInactive) Full name of the second directory to compare/merge (e.g. C:\dir2). If both directories are not from the same panel, the directory from the inactive (target) panel is used. See the Advanced Features section above for details on executing of utilities for comparing/merging of files and directories.
$(FileOrDirToCompareActive) Full name of the first file or directory to compare/merge (e.g. C:\file1.txt). If both files or directories are not from the same panel, the file or directory from the active (source) panel is used. See the Advanced Features section above for details on executing of utilities for comparing/merging of files and directories.
$(FileOrDirToCompareInactive) Full name of the second file or directory to compare/merge (e.g. C:\file2.txt). If both files or directories are not from the same panel, the file or directory from the inactive (target) panel is used. See the Advanced Features section above for details on executing of utilities for comparing/merging of files and directories.
$(ListOfSelectedNames) The list of selected files and directories from the active (source) panel. Names are separated by space character. Names containing spaces are surrounded by double quotes (e.g. dir1 file.txt "my first document.html"). The order of names in the list is the same as in the panel or Find window. The maximum length of the list is 32771 characters (see Command Line Length Limits later on this page for limits overview).
$(ListOfSelectedFullNames) The list of full names of selected files and directories from the active (source) panel. Full names are separated by space character. Full names containing spaces are surrounded by double quotes (e.g. C:\test\dir1 C:\test\file.txt "C:\test\my first document.html"). The order of names in the list is the same as in the panel or Find window. The maximum length of the list is 32771 characters (see Command Line Length Limits later on this page for limits overview).

Command Line Length Limits

The maximal length of command with arguments depends on Windows version and if you are executing command through shell or not (see Execute through shell check box in User Menu dialog box).

Maximal length of command with arguments when executing through system command shell (more precisely using batch file):

Windows VersionMaximal Length
Windows 2000 2041
Windows XP 8185
Windows Vista 8191
Windows 7 8191

Maximal length of command with arguments when executing directly (not through system command shell):

Windows VersionMaximal Length
Windows 2000 2080
Windows XP 2080
Windows Vista 2080
Windows 7 32764

Remarks

When User Menu Bar is visible, you can add new User Menu item using drag & drop operation. Simply drag the application or document to the User Menu bar.

See also

Using User Menu
User Menu dialog box
User Menu Bar