~~Title: CLI ~~ The **CLI** internal command can be used to: * Open the [[:additional_functionality:cli|CLI / Ad-Hoc Script Editor]] window * Open an MS-DOS prompt (with the current directory set to the current folder in the Lister) * Cause the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field to appear in its various modes. **Command Arguments:** $$ Argument $$ Type $$ Possible values $$ Description $$ (#)//no argument// $$ - $$ - $$ Opens an instance of the [[:additional_functionality:cli|CLI / Ad-Hoc Script Editor]] window. $$ DOSPROMPT $$ /O $$ //(no value)// $$ Opens a DOS prompt with the current directory set to the folder displayed in the source file display. You can override the current directory by using the **cd** directive before the **CLI** command (requires using the advanced command editor). ``CLI DOSPROMPT`` $$ $$ $$ **selfolder** $$ Uses the first selected sub-folder in the source display as the CD for the DOS prompt. ``CLI DOSPROMPT=selfolder`` $$ $$ $$ **admin** $$ On Vista and above, opens the DOS prompt elevated (after a UAC prompt). ``CLI DOSPROMPT=admin`` $$ $$ $$ **noadmin** $$ Prevents the DOS prompt from being elevated. ``CLI DOSPROMPT=noadmin`` $$ $$ $$ **powershell** $$ Opens a PowerShell prompt rather than a DOS prompt. ``CLI DOSPROMPT=powershell,admin`` The separate **EXEC** and **TITLE** arguments can be used to choose which version of PowerShell to run and set the window title. $$ $$ $$ **powershellise** $$ Opens a PowerShell ISE rather than a DOS prompt. ``CLI DOSPROMPT=powershellise`` When launching a PowerShell ISE, any color parameters are ignored. This limitation affects the ISE only; DOS prompts and normal PowerShell windows can both have colors specified. $$ $$ $$ **color=**//// $$ Sets the text and background colors of the DOS window. You can use this by itself, or in conjunction with the admin argument to override the default color when the prompt is elevated.\\ The value is specified with two hexadecimal digits - the first corresponds to the background color, and the second to the foreground. The possible colors depend on your system's settings but are as below by default: **Supported color values**\\ |0 = Black|1 = Blue|2 = Green|3 = Aqua| |4 = Red|5 = Purple|6 = Yellow|7 = White| |8 = Gray|9 = Light Blue|A = Light Green|B = Light Aqua| |C = Light Red|D = Light Purple|E = Light Yellow|F = Bright White| Note that you must enclose the entire value of the **DOSPROMPT** argument in quotes when using the **color** parameter (otherwise the embedded **=** sign will confuse the command parser). ``CLI DOSPROMPT="admin,color=97"`` $$ $$ $$ **nocolor** $$ Prevents the color of the DOS prompt from being set when elevated. ``CLI DOSPROMPT=admin,nocolor`` $$ $$ $$ **wsl** $$ Opens a WSL (Windows Subsystem for Linux) shell window. Note that WSL must be installed from the Windows Store. ``CLI DOSPROMPT=wsl`` $$ EXEC $$ /K $$ //// $$ Overrides the default executable to launch when opening a PowerShell prompt. For example, you may wish to create a button which runs PowerShell 7 instead of Windows PowerShell. ``CLI DOSPROMPT=powershell EXEC="C:\Program Files\PowerShell\7\pwsh.exe"`` $$ QUICKCMD $$ /O/R $$ //(no value)// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Command mode, which lets you enter an ad-hoc Opus command to execute in the current file display. This lets you bind a [[:customize:the_customize_dialog:keys|hotkey]] to bring the FAYT field up in the specific mode. ``CLI QUICKCMD`` $$ $$ $$ //// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Command mode, and initialises it with the specified command. Prefix with **noselect:** to place the cursor at the end of the command instead of initially selecting it for typing over. ``CLI QUICKCMD Help``\\ ``CLI QUICKCMD noselect:Help`` $$ QUICKDOSCMD $$ /O/R $$ //(no value)// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in DOS Command mode, which lets you enter a command to execute in a DOS prompt. ``CLI QUICKDOSCMD`` $$ $$ $$ //// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in DOS Command mode, and initialises it with the specified command. Prefix with **noselect:** to place the cursor at the end of the command instead of initially selecting it for typing over. ``CLI QUICKDOSCMD dir``\\ ``CLI QUICKDOSCMD noselect:dir`` $$ QUICKFILTER $$ /O/R $$ //(no value)// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Filter mode, which lets you filter the current file list. ``CLI QUICKFILTER`` $$ $$ $$ //// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Filter mode, and initialises it with the specified pattern. Prefix with **noselect:** to place the cursor at the end of the pattern instead of initially selecting it for typing over. ``CLI QUICKFILTER *.(jpg|png)``\\ ``CLI QUICKFILTER noselect:*.jpg`` $$ QUICKFIND $$ /O/R $$ //(no value)// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Find mode, which lets you scroll to the first file matching the entered string. ``CLI QUICKFIND`` $$ $$ $$ //// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Find mode and initialises it with the specified string. Prefix with **noselect:** to place the cursor at the end of the string instead of initially selecting it for typing over. ``CLI QUICKFIND di``\\ ``CLI QUICKFIND noselect:di`` $$ QUICKFINDCLEAR $$ /S $$ //(no value)// $$ Clears any highlights shown in the file display as a result of a quick find. The same effect is gained by pressing Esc by default. ``CLI QUICKFINDCLEAR`` $$ QUICKFINDREPEAT $$ /O $$ //(no value)// $$ Repeats the last **QUICKFIND**. The behaviour of this command depends on the state of the **Keep highlights visible after field closes** Preferences setting. If highlights are shown even after the FAYT field closes, **QUICKFINDREPEAT** shifts focus to the next match. If highlights are not shown, **QUICKFINDREPEAT** repeats the last find, searching for matches again in the current folder, using the same search string as last time. ``CLI QUICKFINDREPEAT`` $$ $$ $$ **next** $$ Explicitly searches for the next match, whether highlights are visible or not. ``CLI QUICKFINDREPEAT=next`` $$ $$ $$ **prev** $$ Explicitly searches for the previous match, whether highlights are visible or not. ``CLI QUICKFINDREPEAT=prev`` $$ QUICKFOLDERS $$ /O/R $$ //(no value)// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Folders mode, which shows a list of folders drawn from the tab history list, recent list, favorites and Quick Access. The sources for this list can be configured from the [[:preferences:preferences_categories:filtering_and_sorting:find_as_you_type:folders_mode]] Preferences page. ``CLI QUICKFOLDERS`` $$ $$ $$ //// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Folders mode, and initialises it with the specified search string. Prefix with **noselect:** to place the cursor at the end of the string instead of initially selecting it for typing over. ``CLI QUICKFOLDERS noselect:C:\``\\ $$ QUICKFTPCMD $$ /O/R $$ //(no value)// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in a special mode that lets you enter a command to send directly to a remote FTP server. This command only works when you are currently connected to an FTP site. You can view the results of your command in the [[:ftp:ftp_log|FTP log]]. ``CLI QUICKFTPCMD`` $$ $$ $$ //// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in FTP command mode, and initialises it with the specified command. Prefix with **noselect:** to place the cursor at the end of the command instead of initially selecting it for typing over. ``CLI QUICKFTPCMD chmod * 755``\\ ``CLI QUICKFTPCMD noselect:chmod`` * $$ QUICKGO $$ /O/R $$ //(no value)// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in a special mode ("go" mode) that lets you navigate to another folder in the current file display. ``CLI QUICKGO`` $$ $$ $$ //// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in "go" mode, and initialises it with the specified path. Prefix with **noselect:** to place the cursor at the end of the path instead of initially selecting it for typing over. ``CLI QUICKGO C:\Program Files``\\ ``CLI QUICKGO noselect:C:\`` $$ QUICKRANGE $$ /O/R $$ //(no value)// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Range mode, which lets you select files by index (or by a range of indices). This only works when the Index column has been added to the file display. ``CLI QUICKRANGE`` $$ $$ $$ //// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Range mode, and initialises it with the specified range string. Prefix with **noselect:** to place the cursor at the end of the range string instead of initially selecting it for typing over. ``CLI QUICKRANGE 1-10,20-30``\\ ``CLI QUICKRANGE noselect:1-10`` $$ QUICKSEARCH $$ /O/R $$ //(no value)// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Search mode, which lets you initiate a [[:basic_concepts:searching_and_filtering:windows_search|Windows Search]] of the current folder. ``CLI QUICKSEARCH`` $$ $$ $$ //// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Search mode, and initialises it with the specified query term. Prefix with **noselect:** to place the cursor at the end of the query string instead of initially selecting it for typing over. ``CLI QUICKSEARCH author:davidson``\\ ``CLI QUICKSEARCH noselect:author:davidson`` $$ QUICKSEARCHENGINE $$ /K $$ //[,]// $$ Use with the **QUICKSEARCH** argument to specify the search engine to use in Search mode. Each search engine has its own set of options which can also be included in the command. Note that the **everything** and **everythingglobal** engines require [[:additional_functionality:everything_integration|Everything]] to be installed. ^Engine^Description^Options^ |everything|Search the current folder using //Everything//|case| | | |diacritics| | | |wholeword| | | |regexp| |everythingglobal|Search the whole system using //Everything//|case| | | |diacritics| | | |wholeword| | | |regexp| |opus|Search using the Opus [[:basic_concepts:searching_and_filtering:find_files|find tool]]|anywords| | | |case| | | |content| | | |nodiacritics| | | |nonames| | | |nopartial| | | |nowild| | | |utf8| |windows|Search the current folder using Windows Search|noautowildcard| | | |nqs| ``CLI QUICKSEARCH A*.jpg QUICKSEARCHENGINE everything,case`` $$ QUICKSELECT $$ /O/R $$ //(no value)// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Select mode, which lets you select files in the current folder by [[..:..:wildcard_reference:pattern_matching_syntax|wildcard pattern]]. ``CLI QUICKSELECT`` $$ $$ $$ //// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Select mode and initialises it with the specified pattern. Prefix with **noselect:** to place the cursor at the end of the pattern instead of initially selecting it for typing over. ``CLI QUICKSELECT *.doc``\\ ``CLI QUICKSELECT noselect:*.doc`` $$ QUICKTABS $$ /O/R $$ //(no value)// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Tabs mode, which lets you search and switch folder tabs. ``CLI QUICKTABS`` $$ $$ $$ //// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in Tabs mode and initialises it with the specified text. Prefix with **noselect:** to place the cursor at the end of the text instead of initially selecting it for typing over. ``CLI QUICKTABS docu``\\ ``CLI QUICKTABS noselect:docu`` $$ QUICKWSLCMD $$ /O/R $$ //(no value)// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in WSL script mode, which lets you enter a command to execute in a WSL (Windows System For Linux) window. Note that WSL needs to be installed from the Windows Store. ``CLI QUICKWSLCMD`` $$ $$ $$ //// $$ Displays the [[:basic_concepts:the_lister:find-as-you-type_field|find-as-you-type]] field in WSL script mode, and initialises it with the specified command. Prefix with **noselect:** to place the cursor at the end of the command instead of initially selecting it for typing over. ``CLI QUICKWSLCMD ls``\\ ``CLI QUICKWSLCMD noselect:ls`` $$ SCRIPTMODE $$ /O $$ //(no value)// $$ Displays the CLI in Script Mode, which provides a simple way to test [[:scripting|scripts]] before adding them to buttons. ``CLI SCRIPTMODE`` $$ $$ $$ //// $$ Displays the CLI in Script Mode with the language type set to the specified language. If you don't specify a language the CLI will remember the previous language used. ``CLI SCRIPTMODE=jscript`` $$ TITLE $$ /K $$ //// $$ Defines the window title when opening a PowerShell prompt. ``CLI DOSPROMPT=powershell TITLE="Windows PowerShell"``