Batch loops

From wikinotes

for loop

range

REM           (start-counting-at, iterate-by, stop-counting-at)
FOR /L %%i IN (0, 1, 5) DO (
    echo %%i
)

items

FOR /D %%d IN (root will vagrant build) DO (
    echo %%d
)

matching files

FOR /D %%d IN (C:\Users\*) DO (
    echo %%d
)