Como faço isso (executado pelo índice) a partir da linha de comando sem a caixa de diálogo?
Isso não é possível com o uso de programas de três partes.
Você pode tentar usar o tilintar :
Clink combines the native Windows shell cmd.exe with the powerful command line editing features of the GNU Readline library, which provides rich completion, history, and line-editing capabilities. Readline is best known for its use in the well-known Unix shell Bash, the standard shell for Mac OS X and many Linux distributions. Features
- The same line editing as Bash (from GNU’s Readline library).
- History persistence between sessions.
- Context sensitive completion;
- Executables (and aliases).
- Directory commands.
- Environment variables
- Thirdparty tools; Git, Mercurial, SVN, Go, and P4.
- New keyboard shortcuts;
- Paste from clipboard (Ctrl-V).
- Incremental history search (Ctrl-R/Ctrl-S).
- Powerful completion (TAB).
- Undo (Ctrl-Z).
- Automatic “cd ..” (Ctrl-Alt-U).
- Environment variable expansion (Ctrl-Alt-E).
- (press Alt-H for many more…)
- Scriptable completion with Lua.
- Coloured and scriptable prompt.
- Auto-answering of the “Terminate batch job?” prompt.
Existe uma maneira de exibir o histórico de comandos com índices?
doskey /history
displays a list of the previously executed commands however it does not list the indexes.
Pressione F7 para listar o histórico com índices:
Vocêtambémpodequererusar:
F5Scrollthroughhistoryoftypedcommands(↑).
F8Movebackwardsthroughthecommandhistory,butonlydisplaycommandsmatchingthecurrenttextatthecommandprompt.
Fonte
Leitura Adicional
- Um índice A-Z da linha de comando do Windows CMD - Uma excelente referência para todas as coisas relacionadas à linha do Windows cmd.
- sintaxe-teclado - Atalhos de teclado do Windows