please dont rip this site
SET+Setting Operating Parameters

Inserts specified names (strings) into the command

processor's environment.


PC-DOS 2.0+

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




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.


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

command processor.


[For related topics, press R]


APPEND Command


Batch Files

BREAK Command


CTTY Command

EXE2BIN Command

KEYB Command

KEYBxx Command

PROMPT Command

file: /Techref/dos/command/set.htm, 2KB, , updated: 1999/2/20 11:24, local time: 2024/4/13 18:53,

 ©2024 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?
Please DO link to this page! Digg it! / MAKE!

<A HREF=""> dos command set</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.

Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2024 contributors:
o List host: MIT, Site host, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.

Welcome to!