This custom command type lets you run an external program. 


You can configure the following specific properties:


Program

The full path of the program file, or relative path as regards installation folder of FileMenu Tools.


Arguments

The arguments which must be given to the program. If you don't specify this field, by default, the arguments will be the path of all the selected elements in the Windows Explorer. You can specify various variables which will be replaced with its value when the program runs. Click over the right side button to insert the supported variables with the help of the variables window. The possible variables are the following:


  • %: no arguments will be given to the program. This behavior replaces the default behavior if Arguments field is empty (the path of all the selected elements in the Windows Explorer).
  • %DRIVE%: drive letter which is common to the all selected elements.
  • %FOLDERPATH%: if only a folder is selected in Windows Explorer, then this variable is this folder, else this variable is the parent folder path which is common to all the selected elements.
  • %PARENTPATH%: parent folder path which is common to all the selected elements.
  • %FOLDERNAME%: name of the parent folder.
  • %RELPATH%: parent folder path without drive.
  • %FILEPATHS%: full paths of all the selected elements. This is the default variable if you don't specify any argument.
  • %FILENAMES%: names of all the selected elements.
  • %FILEPATHn%: full path of the element at position n.
  • %FILENAMEn%: name of the element at position n.
  • %FILETITLEn%: title (name without extension) of the element at position n.
  • %FILEEXTn%: extension of the element at position n.
  • %TEMPFILEPATHS%: save the full paths of all the selected elements in a temporary file and the variable will be replaced  with the full path of this temporary file.
  • %TEMPFILENAMES%: save the names of all the selected elements in a temporary file and the variable will be replaced  with the full path of this temporary file.
  • %TARGET...%: if you add the prefix TARGET to any above variable, then if you select shortcuts in the Windows Explorer, the variable will access to the target files of the shortcuts.
  • @INPUT:Message@: custom variable. The variable value will be requested when the program runs. Message is the text which will be displayed when the value is requested.
  • @OPENFILE:Message@: lets you select a file when the program runs. The Open File Dialog will be shown to select the file. Message is the text which will be displayed in the dialog.
  • @SAVEFILE:Message@: lets you select a file for save when the program runs. The Save File Dialog will be shown to select the file. Message is the text which will be displayed in the dialog.
  • @FOLDER:Message@: lets you select a folder when the program runs. A dialog will be shown to select the folder. Message is the text which will be displayed in the dialog.
  • <A;B;C>: look for the string B into the string A and replaces it with the string C. The string A may include variables. For example: if you include <%FILEPATHS%;.txt;.bak>, then all the files with .txt extension will be changed with .bak extension.
  • <*A;B;C>: look for the string B into the string A and replaces it with the string C. You may use regular expressions, and the string A may include variables. For example: if you include <*%FOLDERPATH%;(\w\:\\)(\w*);C:\\$2>, and you select the file "D:\My Folder\My File.txt", then this will be replaced with "C:\My Folder" (the parent folder in the C: drive instead the D: drive).


Working Folder

The working folder which the program will be run. You can specify the following variables:

  • %DRIVE%: drive letter which is common to the all selected elements.
  • %FOLDERPATH%: if only a folder is selected in Windows Explorer, then this variable is this folder, else this variable is the parent folder path which is common to all the selected elements.
  • %PARENTPATH%: parent folder which is common to all the selected elements.


Several Instances

Indicates if to run several instances of the external application, one for each selected item in Windows Explorer. This can be useful for programs that support only a filename as parameter. If this parameter is different to "No", then the variables as %FILEPATH1%, %FILENAME1%, etc., take on each new instance of the application executed each of the selected files in Windows Explorer. The possible values ​​may be one of the following:

  • No: normal behavior, that is to say, a single instance of the application is run, passing all selected files.
  • Simultaneous: all instances of the application are run simultaneously.
  • Sequential: each instance of the application is run sequentially, that is to say, an instance of the application only runs the same time, and a new instance only is run when the previous instance is terminated. If you set this value, then you can also set two additional parameters: enter in subfolders and show progress bar.


Several Instances/Enter in subfolders: only available if "Several Instances" is sequential. If this parameter is set to "Yes", then enters recursively in all selected folders and subfolders and run a new instance of the application for each element within these folders. It will be considered only the elements that are the same type as specified in the general parameter "Element Types".


Several Instances/Show Progress Bar

Only available if "Several Instances" is sequential. If this parameter is set to "Yes", then will display a progress bar during the execution of each of the instances of the application. So it is possible to know at any time how many instances remain to run.


Run As Administrator

Choose "Yes" if the program must be run with administrator privileges. If UAC is enabled, then a dialog box will be displayed to confirm the action.


Process Priority

Specifies the priority class in which the process will run: Real time, High, Above normal, Normal, Below normal, Idle.


Convert paths to URL format

If "Yes", then the selected files will be converted to URL format when they are passed to the program. This means that "file://" will be added to the beginning of the file and the special characters will be replaced (for example the blank spaces will be replaced with %20).