How does “FOR” work in cmd batch file?

前端 未结 12 1077
面向向阳花
面向向阳花 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:06

    Here is a good guide:

    FOR /F - Loop command: against a set of files.

    FOR /F - Loop command: against the results of another command.

    FOR - Loop command: all options Files, Directory, List.

    [The whole guide (Windows XP commands):

    http://www.ss64.com/nt/index.html

    Edit: Sorry, didn't see that the link was already in the OP, as it appeared to me as a part of the Amazon link.

提交回复
热议问题