本文翻译自:Defining and using a variable in batch file
I'm trying to define and use a variable in a batch file. 我正在尝试在批处理文件中定义和使用变量。 It looks like it should be simple: 看起来应该很简单:
@echo off
set location = "bob"
echo We're working with "%location%"
The output I get is the following: 我得到的输出如下:
We're working with ""
What's going on here? 这里发生了什么? Why is my variable not being echo'd? 为什么我的变量没有被回显?
#1楼
参考: