for loop working in CMD prompt but not in batch file - for loop was copy pasted

戏子无情 提交于 2019-11-29 10:31:53

In a batch file you have to use two percents for FOR parameters, that's all

for /f "usebackq tokens=1,2,3,*" %%A in (`netsh interface show interface`) do (
    if "%%D"=="Local Area Connection 2" set state=%%B
)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!