for
Conditionally execute a command several times. More information: https://learn.microsoft.com/windows-server/administration/windows-commands/for.
- Execute given commands for the specified set:
for % in () do ()
- Iterate over a given range of numbers:
for /l % in (, , ) do ()
- Iterate over a given list of files:
for % in () do ()
- Iterate over a given list of directories:
for /d % in () do ()
- Perform a given command in every directory:
for /d % in (*) do (if exist % )
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
