Stopping items in batch files from running

Batch files (.bat) are a set of commands that are sent to the command line. They can include limited flow, and do support variables. Windows XP onwards has slowly improved the function of these files.


They can be edited in any text editor (for some history see edlin). If there is a particular command you wish to stop running in a batch file then you can use the command REM at the start of the line which will then cause the operating system to treat whatever appears aftewards as a REMark.

So in the batch file below

@echo off

MD junk

REM DEL *.zip

MOVE*.*  junk


the command to delete all zip files (del *.zip) would not run as the REM command in front of it