tldr/pages.zh/windows/doskey.md

32 lines
569 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# doskey
> 管理宏Windows 命令和命令行。
- 列出可用的宏:
`doskey /macros`
- 创建一个新的宏:
`doskey {{宏的名称}} = "{{命令}}"`
- 为指定可执行文件创建新的宏:
`doskey /exename={{可执行文件名}} {{宏的名称}} = "{{命令}}"`
- 删除一个宏:
`doskey {{宏的名称}} =`
- 列出所有储存在内存中的命令:
`doskey /history`
- 将宏保存到文件以便于移植:
`doskey /macros > {{保存宏的文件名}}`
- 从文件中加载宏:
`doskey /macrofile = {{保存宏的文件名}}`