cmd.exe / k开关 [英] cmd.exe /k switch
本文介绍了cmd.exe / k开关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使用cmd切换到目录,然后执行批处理文件
I am trying to switch to a directory using cmd and then execute a batch file
例如
cmd /k cd "C:\myfolder"
startbatch.bat
b $ b
我也尝试过(未成功)
I have also tried (without success)
cmd cd /k cd "C:\myfolder" | startbatch.bat
虽然第一行(cmd / k)似乎运行确定,永远不会运行。我使用Vista作为操作系统
Although the first line (cmd /k) seems to run ok, but the second command is never run. I am using Vista as the OS
推荐答案
正确的语法是:
cmd /k "cd c:\myfolder & startbatch.bat"
这篇关于cmd.exe / k开关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文