CMD For Loops — Automating Repetitive Developer Tasks
Loop through ranges, files, and command output like a pro:
- 🔢 `for /l` — Numeric range loops (1 to 100, etc.)
- 📁 `for %f in (*.ext)` — Loop over all matching files
- 📝 `for /f` — Parse command output or file contents line by line
- 📂 `for /d` — Loop over directories only
Real Dev Script:
```cmd
for %f in (*.js) do (
echo Processing: %f
node lint.js %f
)
`
Lint all JS files in one sweep from CMD! ✨
