Initializing a batch

Commands that are typically executed at the beginning of a batch script.

Description: At the beginning of a DOS batch file belongs the initialization of the command processor. This is to ensure subsequent DOS batch script will be handled by the command interpreter as we intended to. First let`s turn command-echoing off so that the output screen doesn`t get polluted with batch file content itself during execution. Second, in order to enable the great features of the command processor as required by most the other script code described here, the initialization code shall turn on Extensions and Delayed Expansion.
Script:
1.
2.
3.
4.
@echo off
REM.-- Prepare the Command Processor --
SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION