Can I create shorthand names for use inside cmd?

走远了吗. 提交于 2019-11-29 18:25:01
Andre Ruebel

No, you can't, but you can use the Tab key to complete the correct name. Pressing Tab multiple time cycles through the matching names existing in the current directory.

See Doskey /?.

You could do this

doskey cddesk=cd "%userprofile%\desktop"

Then type cddesk.

By putting all your macros in a batch file you can autoload. Of course you could do this with batchfiles too.

From Technical Reference to the Windows 2000 Registry, Microsoft, 2000.

AutoRun

HKCU\Software\Microsoft\Command Processor 

Data type Range Default value

REG_SZ list of commands There is no default value for this entry.

Description

Contains commands which are executed each time you start Cmd.exe.

Also see this batchfile https://pastebin.com/A2qLw8r3 that list special names.

In a command prompt

start shell:desktop

Or in Start - Run (Winkey + R) just

shell:desktop
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!