There're some of those, e.g., %N, %P, %P%N, %S, %L, %WL, %UL
Here's my relatively recent post (where you can assess in person how they can work):
Hint: Passing TC variables %N,%P,%P%N,etc, as input to PowerShell.ps1 and turning them now into the PS script variables:
viewtopic.php?t=78801
Edit:
From Total Commander 11.00 beta2 help [Help - Index tab > User defined menu > Parameters:]:
Code: Select all
Parameters: Here you can specify command line parameters.
Note: All parameters now support substring fields in the form :~start,length, e.g. %N:~2,5 or %N:~-8,5 . To append a number directly after the length value, use another ~ character, e.g. %N:~2,5~2. Negative vaules are measured from the end of the string. Example: %P:~0,-1 cuts off the backslash from the path.
The Start value -0 is special: %N:~-0,20 copies the first 20 characters of the name without extension, %N:~-0,-20 the first 20 characters of the extension without the name.
Special parameters:
? as the first parameter causes a Dialog box to be displayed before starting the program, containing the following parameters. You can change the parameters before starting the program. You can even prevent the program's execution.
%P causes the source path to be inserted into the command line, including a backslash (\) at the end.
%N places the filename under the cursor into the command line.
%T inserts the current target path. Especially useful for packers.
%M places the current filename in the target directory into the command line.
%O places the current filename without extension into the command line.
%E places the current extension (without leading period) into the command line.
%B, %B0..%B9 adds a directory name from the path (including the relative path from branch view, or the search result).
%B or %B0 = parent directory, %B1 = grandparent directory etc.
%BT, %BT0..%BT9 adds a directory name from the target path (without the relative path from branch view).
%BT or %BT0 = parent directory, %BT1 = grandparent directory etc.
%B-, %B-0..%B-9 adds a directory name from the path without the relative path from branch view, empty in search result).
%B- or %B-0 = parent directory, %B-1 = grandparent directory etc.
%B+, %B+0..%B+9 adds a directory name from the path (with branch view), counting from the start with the drive/server name:
%B+ drive letter with ":", %B+0 = drive letter without ":", %B+1 = first directory or share, %B+2 = second directory etc.
%S insert the names of all selected files into the command line. Names containing spaces will be surrounded by double quotes. Please note the maximum command line length of 32767 characters.
%S10 insert the names of the first 10 selected files (max.) into the command line. Allows you to limit the number of file names passed to the program. You can use any other number.
%P%S insert the names of all selected files into the command line, with full path. Names containing spaces will be surrounded by double quotes. Do NOT put quotes around %P%S yourself!
%R like %S, but with selected names from the target panel
Notes: %N and %M insert the long name, while %n and %m insert the DOS alias name (8.3). %P and %T insert the long path name, and %p and %t the short path name. (Same for %o, %e, %b and %s). %p/%t inserts the ftp URL of the directory for ftp connections.
By putting %P, %p, %T or %t directly in front of %S or %s, the path name is inserted with the file name for each file. Example: %P%S inserts the long path and file name for all selected files.
%C1 Like the first parameter of "Compare by content": First selected file, or file under cursor
%C2 Like the second parameter of "Compare by content": Second selected file, or first selected in target panel, or file with same name in target panel. Note: If the right panel is active and less than 2 files are selected, %C1 and %C2 will be reversed.
%C3..%C9 Selected files Nr. 3 .. 9 in source panel, empty if not enough selected
%c1..%c9 Like %C1..%C9, but with 8.3 names and paths
%% inserts the percent-sign.
%L, %l, %F, %f, %D, %d, %WL, %WF, %UL, %UF create a list file in the TEMP directory with the names of the selected files and directories, and appends the name of the list file to the command line. The list is deleted automatically when the called program quits. Only one list per command is supported. Include parameter %a to also append selected files and directories from the target panel. 10 types of list files can be created:
%L Long file names including the complete path, e.g. c:\Program Files\Long name.exe
%l (lowercase L) Short file names including the complete path, e.g. C:\PROGRA~1\LONGNA~1.EXE
%F Long file names without path, e.g. Long name.exe
%f Short file names without path, e.g. LONGNA~1.EXE
%D Short file names including the complete path, but using the DOS character set for accents.
%d Short file names without path, but using the DOS character set for accents.
%Q Turn off automatic quotation marks around certain parameters like %P%N when the name contains a space. The user will then have to place them by himself.
%UL, %UF like %L and %F, but with a UTF-8 Unicode list file (with byte order mark)
%WL, %WF like %L and %F, but with a UTF-16 Unicode list file (with byte order mark)
%v Insert virtual file name in case of file system plugins like "virtual panel", where %N pastes the name of the real file (in the file system) to which the entry points to
%V Like %v, but including the full path (including the plugin name)
%X Interprets the following parameters after this parameter as left/right instead of source/target:
%P, %p (left path), %T, %t (right path), %N, %n (left name), %M, %m (right name),
%S, %s (left selected), %R, %r (right selected)
Example: %X%P %T sends left and right path to e.g. an external sync tool
%x Interprets the following parameters after this parameter again as source/target
Example: %X%P %x%P sends left and source path to the called program
%Y anywhere in the parameters: Pass empty list to program when nothing is selected when using one of the List parameters like %L, or multi-file parameters like %S. Otherwise, the file under the cursor would be passed.
%y anywhere in the parameters: When nothing is selected when using one of the List parameters like %L, pass all other parameters except for the list parameter to the called program.
Note: %Y%y works like %y when something is selected or the cursor stands on "..", otherwise it selects the file under the cursor.
%Z anywhere in the parameters: Allow to pass archives as path to programs for %P or %T when inside an archive
Example: %Z%P passes name of archive to external tool when TC shows contents of an archive
%|envvar| Insert environment variable envvar in the parameters field. Using %envvar% directly isn't possible, because the % sign is already used for placeholders. Therefore this modified syntax needs to be used. The "command" field still uses the normal %envvar% field.