Batch "macros" pack command sequences into variables executed with %macro%.
Cmd Expert · Lesson 1 · On the house
Batch macros concept
Percent tricks for reusable snippets. Lesson 1 is free — on the house.
Lessons · Cmd Expert · Lesson 1 of 10 · On the house
Batch macros concept
Percent tricks for reusable snippets.

They rely on careful escaping, delayed expansion, and FOR tricks.
Useful in constrained environments where PowerShell is blocked — still fragile.
Document macros heavily; future you will not remember the caret maze.
Prefer functions in PowerShell/pwsh when policy allows.
macros
rem Concept: set "macro=echo hello& echo world" then %macro%Quiz
Quiz
Quiz
Check
Match the still for: Batch macros concept.
Open-book: the answers are on this page. Pass every quiz and check (4) to mark the lesson done. This visit: 0/4.