11.01.2020
Posted by 
Batch file script commands
  1. Dos Batch File Tutorial
  2. Batch File Script Commands

Dos Batch File Tutorial

Dos batch file commands

Batch File Script Commands

Here’s an example of a batch file that does a few common things:@ECHO OFF@rem 'pushd $dir ' puts $dir on directory stackpushd.SET COMMENT =%1IF NOT DEFINED COMMENT SET COMMENT = 'SET FOO = 'bar'IF%FOO% 'bar' goto ISBARecho The above should always be truegoto END:ISBARnmake -f Makefile.vcIF ERRORLEVEL 1 goto ERRONEORHIGHERecho Compilation successful!goto END:ERRONEORHIGHERecho Compilation failed!goto END:END@rem popd pops the directory name from the stack and does cd therepopd.