Displaying the current environment settings
When you type the set command alone, Windows NT displays the current environment settings. These
settings usually include the comspec and path environment variables that Windows NT uses to help find programs on disk. Prompt and dircmd are two other environment variables that Windows NT uses.
When you use a set command and specify values for both variable and string,
Windows NT adds the specified variable value to the environment and associates
the string with that variable. If variable already exists in the environment, the
new string value replaces the old string value.
If you specify only a variable and an equal sign (without a string) for the set command, Windows NT clears the string value associated with the variable (as
if the variable is not there at all).
Using set in batch files
When creating batch files, you can use the set command to create variables and use them in the same way as you would the
numbered variables %0 through %9. You can also use the variables %0 through %9 as input for the set command.
Calling a set variable from a batch file
When you call a variable value from a batch file, you must enclose the value
with percent signs (%). For example, if your batch program creates an
environment variable named baud, you can use the string associated with baud as a replaceable parameter by inserting %baud% on the command line.
More Information About Set