How does “FOR” work in cmd batch file?

前端 未结 12 1072
面向向阳花
面向向阳花 2020-12-03 10:40

I\'ve been programming in dozens of languages for 20 years but I could never understand how \"FOR\" work in windows cmd shell batch file, no matter how hard I tried. I read

12条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-03 11:20

    It works for me, try it.

    for /f "tokens=* delims=;" %g in ('echo %PATH%') do echo %g%

提交回复
热议问题