Endlocal command in Windows
The endlocal command ends the localization of the environment changes in a batch file, and restores the environment variables to their original values before the corresponding setlocal command is run.
For an example of how to use this command, please see the example below.
Endlocal command syntax
endlocal
Parameters
Parameter Description /? Show help at the command prompt.Note
- The endlocal command has no effect outside the script or batch file.
- There is an implicit endlocal command at the end of each batch file.
- If the command extensions are enabled (command extensions are enabled by default), the endlocal command restores the state of the command extensions (that is, enabled or disabled) becomes the state before the corresponding setlocal command is run.
Note:
For more information on how to enable and disable command extensions, refer to the article about the Cmd command in Windows.
For example
You can localize environment variables in a batch file. For example, the following command line starts the super-application batch program on the network, passes the output to a file and displays that file in Notepad:
@echo off setlocal path=g:programssuperapp;%path% call superapp>c:superapp.out endlocal start notepad c:superapp.out
See more:
- The echo command in Windows
- Edit command in Windows
- Driverquery command in Windows
4 ★ | 1 Vote
You should read it
May be interested
- Cmd command in Windowsthe cmd command starts a new version of the command interpreter, cmd.exe. if used without parameters, cmd will display copyright information and the version of the operating system.
- Reg command copy in Windowsto copy an entry to the location specified on the local pc or the remote computer we will use the reg copy command. to learn more about how to use the reg copy command, you can track the syntax, explain the command parameters and the example tipsmake.com has compiled below.
- What is Catalyst Control Center (CCC.exe)?catalyst control center is a utility that comes with drivers, which helps amd graphics cards work. it appears as ccc.exe in the user's task manager and in most cases, you will never have to worry about this.
- Reg delete command in Windowsthe reg delete command helps delete subkeys or entries in the registry
- Eventquery command in Windowsthe eventquery command lists events and event properties from one or more event logs.
- What is Unix and why is it important?most of the current operating systems can be grouped into two different branches. besides operating systems based on microsoft windows nt, nearly every other operating system is a 'descendant' of unix.