• Variable delay explain call SETLOCAL


    For batch processing novices, the concept of “variable delay” is probably unheard of. However, it is like an invisible high wall on your way forward. You can’t feel its existence, but when you try to rush forward, it will bounce you back violently, making you unable to overstep and return without success. Once you find […]

  • The function of SETLOCAL enablededelayedexpansion in batch processing


    Set local to delay extension. In fact, that is: delay variable, full name delay environment variable extension, to advance, variable delay is a must! So I hope you can take this part seriously. To better illustrate the problem, let’s first introduce an example. Example 1: @echo off set a=4 set a=5&echo %a% pause Results: 4Explanation: […]

  • Introduction to CMD SETLOCAL


    SETLOCAL Start localization of environment changes in batch files. Environment changes made after SETLOCAL are limited to batch files. To restore the original settings, endlocal must be executed. When the end of a batch file is reached, an implied endlocal is executed for each SETLOCAL command that has not yet been executed for that batch […]