How can I pass arguments to a batch file?

后端 未结 18 2142
陌清茗
陌清茗 2020-11-22 02:53

I need to pass an ID and a password to a batch file at the time of running rather than hardcoding them into the file.

Here\'s what the command line looks like:

18条回答
  •  礼貌的吻别
    2020-11-22 03:08

    To refer to a set variable in command line you would need to use %a% so for example:

    set a=100 
    echo %a%  
    rem output = 100 
    

    Note: This works for Windows 7 pro.

提交回复
热议问题