相关疑难解决方法(0)

用于运行.bat文件的命令

我正在尝试使我的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脚本中.

我怎么能在一行中做到这一点?

windows command cmd prompt

22
推荐指数
4
解决办法
20万
查看次数

批处理文件串联命令行参数

例如,我创建了一个名为的批处理文件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


正确的方法是什么?

batch-file

1
推荐指数
1
解决办法
7375
查看次数

标签 统计

batch-file ×1

cmd ×1

command ×1

prompt ×1

windows ×1