Categories
Tech

Variable interpolation in Batch Files

Apparently it is possible to use variable interpolation in Windows batch files.
@echo off
set myVar=bob

goto print_%myVar%

echo ALICE

:print_bob

echo BOB

Output is:
BOB

Useful for all kinds of things…

Leave a Reply

Your email address will not be published. Required fields are marked *