"SET" Command Scope in Batch File
-
I would like to run the same batch file twice at about the same time. Both batch files create the same variables using the "SET" command. Is there any chance that one batch file will overwrite the value created in the other, or does the SET command declare only local variables? Thanks,
Sounds like somebody's got a case of the Mondays -Jeff
-
I would like to run the same batch file twice at about the same time. Both batch files create the same variables using the "SET" command. Is there any chance that one batch file will overwrite the value created in the other, or does the SET command declare only local variables? Thanks,
Sounds like somebody's got a case of the Mondays -Jeff
Skippums wrote:
or does the SET command declare only local variables?
Yes, SET creates environment variables but they only exist within the scope of the command that runs them. Thus your two batch files will inherit the environment variables of the parent process (Windows ???) but any new ones they create will not be seen by the other process.