我正在尝试使我的Visual Studio构建脚本执行一个重要的.bat文件.
这就是我现在想做的事情:
cd "F:\- Big Packets -\kitterengine\Common\" Template.bat
Run Code Online (Sandbox Code Playgroud)
但它不起作用.
我必须这样做才能使它工作:
cd "F:\- Big Packets -\kitterengine\Common\"
F:
Template.bat
Run Code Online (Sandbox Code Playgroud)
但是这很难添加到Visual Studio脚本中.
我怎么能在一行中做到这一点?
例如,我创建了一个名为的批处理文件concatenate.bat:
@echo off
set foo=%1\bar
echo %foo%
Run Code Online (Sandbox Code Playgroud)
当我跑步 concatenate.bat "C:\somewhere\with spaces"
我想要foo输出:
"C:\somewhere\with spaces\bar"
但是我得到了:
"C:\somewhere\with spaces"\bar
我也尝试过: set "foo=%1\bar"
哪个输出: "C:\somewhere\with spaces"\bar
正确的方法是什么?