for: refresh page (#7535)

feature/windows-fix-syntax-2
Emily Grace Seville 2021-12-21 22:48:58 +10:00 committed by GitHub
parent 69431019c6
commit dede3e7041
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -3,22 +3,22 @@
> Conditionally execute a command several times.
> More information: <https://docs.microsoft.com/windows-server/administration/windows-commands/for>.
- Execute the specified commands for the specified set:
- Execute given commands for the specified set:
`for %{{variable}} in ({{item_a item_b item_c}}) do ({{echo Loop is executed}})`
- Iterate over range:
- Iterate over a given range of numbers:
`for /l %{{variable}} in ({{from}}, {{step}}, {{to}}) do ({{echo Loop is executed}})`
- Iterate over files:
- Iterate over a given list of files:
`for %{{variable}} in ({{file_a.ext file_b.ext file_c.ext}}) do ({{echo Loop is executed}})`
- Iterate over directories:
- Iterate over a given list of directories:
`for /d %{{variable}} in ({{directory_a/ directory_b/ directory_c/}}) do ({{echo Loop is executed}})`
- Perform a command in every directory:
- Perform a given command in every directory:
`for /d %{{variable}} in (*) do (if exist %{{variable}} {{echo Loop is executed}})`