SET+Setting Operating Parameters
Inserts specified names (strings) into the command
MS-DOS equivalent: SET (2.0+)
SET [name = [parameter]]
name Specifies a variable.
[parameter] Specifies a new value for the environment.
SET is used to pass arguments to application programs or to
batch files that look into the DOS environment for operating
SET FIL = \PROGFIL
instructs DOS to look in the \PROGFIL directory when an
application program interrogates the environment for FIL.
displays the names that have been set in the environment, such as
the path and the prompt.
SET NAME = HAROLD
allows you to call the value assigned to NAME from a batch file.
In the batch file, you must enclose the variable NAME in percent
signs, which indicate to DOS that a variable is being used rather
than a command-line argument (see Appendix A for more information
about batch files and using variables in them). To call the value
assigned to NAME- -for example, to change to Harold's directory-
-you would enter the line in the batch file as
If ECHO were on, you would see
when this line was executed.
To remove a string from the environment, you merely repeat
the SET command using the name parameter without specifying any
other parameter. For example, to remove NAME = HAROLD from the
environment, simply enter
SET Name =
All names are converted to uppercase in the environment, but
parameters will remain uppercase and lowercase as you enter them.
The SET command is useful for allowing application programs or
batch files to be written generically while you assign values
dynamically in the course of a program or batch file.
One of the strings placed in the environment automatically
is the COMSPEC= parameter, which describes the path that DOS uses
to reload the command processor when required. To use a command
processor other than COMMAND.COM, you need to use the COMSPEC=
parameter in the SET command. Always use the drive letter in the
path used to describe the location of COMMAND.COM or your own
[For related topics, press R]
|file: /Techref/dos/command/set.htm, 2KB, , updated: 1999/2/20 10:24, local time: 2022/12/5 07:10,
|©2022 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://www.massmind.org/Techref/dos/command/set.htm"> dos command set</A>
|Did you find what you needed?|
Welcome to massmind.org!
Welcome to www.massmind.org!