Defining and using a variable in batch file

前端 未结 4 1530
一向
一向 2020-11-22 16:01

I\'m trying to define and use a variable in a batch file. It looks like it should be simple:

@echo off

set locatio         


        
4条回答
  •  清酒与你
    2020-11-22 16:42

    The space before the = is interpreted as part of the name, and the space after it (as well as the quotation marks) are interpreted as part of the value. So the variable you’ve created can be referenced with %location %. If that’s not what you want, remove the extra space(s) in the definition.

提交回复
热议问题