SETDOS - Set the CMD.EXE configuration
Purpose: Display or set the CMD.EXE configuration.
Format: SETDOS [/A? /B? /C? /D? /E? /Fn.n /G?? /I+|- command /L? /M?
/N? /P? /R? /S?:? /U? /V? /X[+|-]n /Y?]
/B(right background) /N(o clobber)
/C(ompound) /P(arameter character)
/D(escriptions) /R(ows)
/E(scape character) /S(hape of cursor)
/F(ormat for @EVAL) /U(pper case)
/G (numeric separators) /V(erbose)
/I(nternal commands) /X (expansion, special
characters)
/L(ine) /Y (debug batch file)
/M(ode for editing)
Usage
SETDOS allows you to customize certain aspects of CMD.EXE to suit your
personal tastes or the configuration of your system. Each of these
options is described below.
You can display the value of all SETDOS options by entering the SETDOS
command with no parameters.
Most of the SETDOS options can be initialized when CMD.EXE executes the
configuration directives in CMD.INI, and can also be set on the Command
Line 1, Command Line 2, Options 1, or Options 2 pages of the OPTION
dialogs. The name of the corresponding directive is listed with each
option below; if none is listed, that option cannot be set with OPTION or
from the .INI file. You can also define the SETDOS options in your
AUTOEXEC.BAT, 4START, or other startup file (see Automatic Batch Files),
in aliases, or at the command line.
Secondary shells automatically inherit most configuration settings
currently in effect in the previous shell. If values have been changed
by SETDOS since CMD.EXE started, the new values will be passed to the
secondary shell.
SETDOS /I settings are not inherited by secondary shells. If you want to
use SETDOS /I- to disable commands in all shells, place the SETDOS
command(s) in your 4START file, which is executed when any shell starts.
Options
/B: (Bright background) This option determines whether CMD.EXE
configures your video adapter for blinking text (/B0, the
default) or bright background colors (/B1), or leave the video
bright / blink configuration unchanged (/B2). See Colors and
Color Names for a detailed discussion of this option. Also
see the BrightBG directive.
/C: (Compound character) This option sets the character used for
separating multiple commands on the same line. The default is
the ampersand [&]. You cannot use any of the redirection
characters (| > <), or the blank, tab, comma, or equal sign as
the command separator. The command separator is saved by
SETLOCAL and restored by ENDLOCAL. This example changes the
separator to a tilde [˜]:
[c:\] setdos /c˜
If you want to share batch files or aliases among 4DOS,
CMD.EXE, 4NT, and Take Command, see the %+ variable, which
retrieves the current command separator, and Special Character
Compatibility for details on using compatible command
separators for all the products you use. Also see the
CommandSep directive.
/D: (Descriptions) This option controls whether file processing
commands like COPY, DEL, MOVE, and REN process file
descriptions along with the files they belong to. /D1 turns
description processing on, which is the default. /D0 turns
description processing off. Also see the Descriptions
directive.
You can also use /D to set the name of the hidden file in each
directory that contains file descriptions. To do so, follow
/D with the filename in quotes:
[c:\] setdos /d"files.bbs"
Use this option with caution because changing the name of the
description file will make it difficult to transfer file
descriptions to another system. This option is provided for
bulletin board system operators and others who have special
needs.
Also see the DescriptionName directive.
/E: (Escape character) This option sets the character used to
suppress the normal meaning of the following character. Any
character following the escape character will be passed
unmodified to the command. The default escape character is a
caret [^]. You cannot use any of the redirection characters
(| > <) or the blank, tab, comma, or equal sign as the escape
character. The escape character is saved by SETLOCAL and
restored by ENDLOCAL. Certain characters (b, c, e, f, k, n,
q, r, s, and t) have special meanings when immediately
preceded by the escape character.
If you want to share batch files or aliases among 4DOS,
CMD.EXE, 4NT, and Take Command, see the %= variable, which
retrieves the current escape character, and Special Character
Compatibility for details on using compatible escape
characters for all the products you use. Also see the
EscapeChar directive.
/F: (Format for @EVAL) This option lets you set default decimal
precision for the @EVAL variable function. The maximum
precision is 16 digits to the left of the decimal point and 8
digits to the right of the decimal point. The general form of
this option is /Fx.y, where x sets the minimum number of
digits to the right of the decimal place and y sets the
maximum number of digits. You can use =x,y instead of =x.y if
the comma is your decimal separator. Both values can range
from 0 to 8; if x is greater than y, it is ignored. You can
specify either or both values: /F2.5, /F2, and /F.5 are all
valid entries.
See @EVAL if you want to set the precision for a single
computation.
Also see the EvalMax and EvalMin directives.
/G: (Numeric separators) This option sets the decimal and
thousands separator characters. The format is /Gxy where x is
the new decimal separator and y is the new thousands
separator. Both characters must be included. The only valid
settings are /G., (period is the decimal separator, comma is
the thousands separator); /G,. (the reverse); or /G0 to remove
any custom setting and use the default separators associated
with your current country code (this is the default).
The decimal separator is used for @EVAL, numeric IF and IFF
tests, version numbers, and other similar uses. The thousands
separator is used for numeric output, and is skipped when
performing calculations in @EVAL.
/I: (Internal) This option allows you to disable or enable
internal commands. To disable a command, precede the command
name with a minus [-]. To re-enable a command, precede it
with a plus [+]. For example, to disable the internal LIST
command to force CMD.EXE to use an external command:
[c:\] setdos /i-list
/L: (Line) This option controls how CMD.EXE gets its input from
the command line. /L0 tells CMD.EXE to use character input
(the default). /L1 tells it to use line input (like CMD.EXE
). /L1 will disable command-line editing, history recall,
filename completion, and the directory history window, and
will reduce the CMD.EXE input length limit from 1023
characters to 255 characters. It should only be used if it is
needed for compatibility with a specific program. If you have
a program that requires line input, you can use the following
line in an alias or batch file to change the line input option
just for that single program:
setdos /L1 & program %& & setdos /L0
See README.DOC for information on programs which require this
option. Also see the LineInput directive.
/M: (Mode) This option controls the initial line editing mode. To
start in overstrike mode at the beginning of each command
line, use /M0 (the default). To start in insert mode, use
/M1. Also see the EditMode directive.
/N: (No clobber) This option controls output redirection). /N0
means existing files will be overwritten by output redirection
(with >) and that appending (with >>) does not require the
file to exist already. This is the default. /N1 means
existing files may not be overwritten by output redirection,
and that when appending the output file must exist. A /N1
setting can be overridden with the [!] character. If you use
/N1, you may have problems with a few unusual programs that
shell out to run a command with redirection, and expect to be
able to overwrite an existing file. Also see the NoClobber
directive.
/P: (Parameter character) This option sets the character used
after a percent sign to specify all or all remaining
command-line arguments in a batch file or alias (e.g., %& or
%n&. The default is the dollar sign [$]. The parameter
character is saved by SETLOCAL and restored by ENDLOCAL.
If you want to share batch files or aliases among 4DOS,
CMD.EXE, 4NT, and Take Command, see Special Character
Compatibility for details on selecting compatible parameter
characters for all the products you use. Also see the
ParameterChar directive.
/R: (Rows) This option sets the number of screen rows used by the
video display. Normally CMD.EXE detects the screen size, but
if you have a non-standard display you may need to set it
explicitly. This option does not affect screen scrolling
(which is controlled by your video driver). It also does not
set the screen size; it is used only to specify the screen
height for LIST, SELECT, paged output options (i.e., TYPE /P),
and error checking in the screen output commands. Also see
the ScreenRows directive.
/S: (Shape) This option sets the cursor shape. The format is
/So:i where o is the cursor size for overstrike mode and i is
the cursor size for insert mode. The size is entered as a
percentage of the total character height. The default values
are 10:100 (a 10% underscore cursor for overstrike mode, and a
100% block cursor for insert mode). Because of the way video
drivers remap the cursor shape, you may not get a smooth
progression in the cursor size from 0% - 100%. To disable the
cursor, enter /S0:0.
If either value is -1, CMD.EXE will not attempt to modify the
cursor shape at all. You can use this feature to give another
program full control of the cursor shape. You can retrieve
the current cursor shape values with the %_CI and %_CO
internal variables.
Also see the CursorOver and CursorIns directives.
/U: (Upper) This option controls the default case (upper or lower)
for file and directory names displayed by internal commands
like COPY and DIR. /U0 displays file names in lower case (the
default). /U1 displays file names in the traditional upper
case. The /U setting is ignored for HPFS filenames. HPFS
names are always displayed in the case in which they are
stored.
Also see the UpperCase directive.
/V: (Verbose) This option controls the default for command echoing
in batch files. /V0 disables echoing of batch file commands
unless ECHO is explicitly set ON. /V1, the default setting,
enables echoing of batch file commands unless ECHO is
explicitly set OFF. Also see the BatchEcho directive.
/V2 forces echoing of all batch file commands, even if ECHO is
set OFF or the line begins with an "@". This allows you to
turn echoing on for a batch file without editing the batch
file and removing the ECHO OFF command(s) within it. /V2 is
intended for debugging, and can be set with SETDOS, but not
with the OPTION command or the BatchEcho directive in CMD.INI.
For more information on batch file debugging see Debugging
Batch Files and /Y below.
/X[+|-]n:
( eXpansionandspecialcharacters
)
This
optionenablesanddisablesaliasandenvironmentvariableexpansion
,
and
controls
whether
specialcharactershavetheirusualmeaningoraretreatedastext . It
is
most
often
used
in
batchfilestoprocesstextstringswhichmaycontainspecialcharacters
.
The features enabled or disabled by /X are numbered. All
features are enabled when CMD.EXE starts, and you can
re-enable all features at any time by using /X0. To disable a
particular feature, use /X-n, where n is the feature number
from the list below. To re-enable the feature, use /X+n. To
enable or disable multiple individual features, list their
numbers in sequence after the + or - (e.g. /X-345 to disable
features 3, 4, and 5).
The features are:
1 All alias expansion.
2 Nested alias expansion only.
3 All variable expansion (environment variables and batch
and alias parameters).
4 Nested variable expansion only.
5 Multiple commands, conditional commands, and piping.
6 Redirection.
7 Quoting (double quotes and back quotes) and square
brackets.
8 Escape character.
If nested alias expansion is disabled, the first alias of a command is
expanded but any aliases it invokes are not expanded. If nested variable
expansion is disabled, each variable is expanded once, but variables
containing the names of other variables are not expanded further.
For example, to disable all features except alias expansion while you are
processing a text file containing special characters:
setdos /x-35678
... [perform text processing here]
setdos /x0
/Y:(debug batch file) /Y1 enables the built-in batch file debugger. The
debuggger allows you to "single-step" through a batch file line by line,
with the file displayed in a popup window as it executes. For complete
details on using the debugger see Debugging Batch Files (this topic also
covers additional debugging techniques which do not require stepping
through each line individually).
To start the debugger, insert a SETDOS /Y1 command at the beginning of
the portion of the batch file you want to debug, and a SETDOS /Y0 command
at the end.
You cannot use the batch debugger with REXX files or EXTPROC files. It
can only be used with normal CMD.EXE batch files.
You can also invoke SETDOS /Y1 from the prompt, but because the debugger
is automatically turned off whenever the command processor returns to the
prompt, you must enter the SETDOS command and the batch file name on the
same line. For example:
[c:\] setdos /y1 & mybatch.btm
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs