windows 创建cmd alias
windows cmd bat alias 命令 别名
1. 创建文件 C:\cmd-alias.bat
@doskey sayhello=echo Hello $* @doskey cattxt=type xxxxxxx.txt $* @doskey ls=dir /b $* @doskey l=dir /od/p/q/tw $* @doskey cat=type $* @doskey rm=del $* @doskey touch=copy /b NUL $* @doskey cd-=popd @doskey cd=pushd $* @doskey n2="C:\Program Files (x86)\Notepad++\notepad++.exe" $* @doskey emacs=runemacs $* @doskey open=start $*
2. 编辑注册表 regedit
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
+ key/value pair
AutoRun => C:\cmd-alias.bat