SETLOCAL

RECENT NEWS

12/18/2015 - Hello! We're excited to announce that Mental Works Computing Software will soon be featuring

12/11/2015 - We're going to announce Dr.Batcher 3.0 Alpha with batch files debugger support soon. If you want to start...

News history...

TESTIMONIALS

Rob van der Woude:
"Mental Works Computing Software has created a nice tool for...

Andrew Jaritsyn:
“I used to write batch files with the help of Notepad, but...

Steve H.:
“This tool helped me to write some batch files in a couple...

More...

SETLOCAL

Starts the localization of environment changes in your batch file.

Syntax:

SETLOCAL [enableextensions | disableextensions] [enabledelayedexpansion | disabledelayedexpansion]

Enableextensions – enables command extensions.

Disableextensions ‑ disables command extensions.

Enabledelayedexpansion – enables delayed variable expansion.

Disabledelayedexpansion – disables delayed variable expansion.

Usage:

SETLOCAL has no effect outside batch files.

If you do not use SETLOCAL and ENDLOCAL, all variables from your batch file automatically become global ones.

All changes made by SETLOCAL are applied before another SETLOCAL or ENDLOCAL.

You can make nested SETLOCAL- ENDLOCAL pairs.

 

Subscribe batch files programming newsletter (no spam):

Subscribe

Unsubscribe