windows - mkdir && cd 窗口别名

标签 windows cmd doskey

我正在尝试创建一个目录并立即使用 DOSKEY 将其更改。我认为这可行,但它给了我错误 The filename, directory name, or volume label syntax is incorrect.

DOSKEY md=mkdir $* && cd $*

有谁知道为什么这是错误的以及如何解决它?

最佳答案

我最终找到了答案 here

DOSKEY md=mkdir "$1"$tcd "$1"

我试图使用 && 而不是 $t

关于windows - mkdir && cd 窗口别名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36133786/

相关文章:

bash - "' C :\Program ' is not recognized as an internal or external command" error when using Azure CLI

windows - 如何将命令行参数传递给由 doskey 调用的 PowerShell 脚本

在 DOSKEY 宏中重定向 STDERR 和 STDOUT

powershell - 使用 doskey 宏在 PowerShell 中设置别名

c++ - 以编程方式重新启动所有崩溃服务的服务程序

windows - 如何测试文件是否是批处理脚本中的目录?

c++ - Linux编译代码失败,Windows编译成功 : Cause/Fix?

c++ - R CMD SHLIB 'undefined reference' 并且不为 SWIG 生成的 R 包装器生成 .so/.dll

python - 使用系统 python 通过 GitBash 创建 Windows virtualenv?

python - 打印到屏幕时修改字体大小