for %%F in (*.txt) do echo %%F loops files in a .bat (use %F interactively).
Cmd Easy · Lesson 1 · On the house
for loops in bat
Iterate files and tokens. Lesson 1 is free — on the house.
Lessons · Cmd Easy · Lesson 1 of 10 · On the house
for loops in bat
Iterate files and tokens.

for /f parses command output or files into tokens.
Use delayed expansion when modifying vars inside blocks (next lessons deepen this).
Quote paths; spaces break naive loops.
Prefer robocopy/PowerShell for complex bulk work when batch loops get brittle.
for
for %F in (*.txt) do @echo %FQuiz
Quiz
Quiz
Check
Match the still for: for loops in bat.
Open-book: the answers are on this page. Pass every quiz and check (4) to mark the lesson done. This visit: 0/4.