Windows Batch Gotcha: Use REM Inside IF Blocks

Normally I comment out lines in a Windows batch script by prefixing them with “::”—it just looks better to me than “REM”. But today I found out the hard way (of course) that you can’t do that inside an IF block, or the script dies with…

The syntax of the command is incorrect.

http://www.petri.co.il/forums/showthread.php?t=43604

Advertisements

Author: Jeff Garretson

Husband, father. Data Scientist. Explorer of Powerful Ideas. Faith and Reason in one package.