Home > Commands A-M > Commands M

MODE (Configure Printer)

Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Configures a printer connected to a parallel printer port.

This version of the MODE command sets the characteristics for an IBM-compatible or Epson-compatible printer connected to a parallel printer port (LPT1, LPT2, or LPT3).


MODE LPTn[:] [c][,[l][,r]]


c (v1.1 NT3.5)
COLS=c (v4.0 Win95 NT3.5)
Specifies the number of characters (columns) per line: 80 or 132. The default value is 80. You can abbreviate this parameter by omitting COLS= and specifying a value for c.
l (v1.1 NT3.5)
LINES=l (v4.0 Win95 NT3.5)
Specifies the vertical spacing and the number of lines per inch: 6 or 8. The default value is 6. You can abbreviate this parameter by omitting LINES= and specifying a value for l.
LPTn[:] (v1.1 Win95 NT3.5)
Specifies the parallel port to which the device is attached. Valid values for n are in the range 1 through 3.
If you omit any of the three parameters, MODE uses the most recent setting for the omitted parameter. If you are using the shorter form of the syntax (without the words COLS=, LINES=, and RETRY=), the MODE command "recognizes" the parameters by their positions. Thus, if you do not specify a value for a parameter, you must still type the comma that precedes the next parameter.
r (v1.1 NT3.5)
RETRY=r (v4.0 Win95)
Specifies the retry action to take if a time-out error occurs when MODE attempts to send output to a parallel printer. This parameter causes part of MODE to remain resident in memory. The list shows each valid value for r and a brief description of its meaning:
If you are using the MODE command over a network, do not use any of the r values.
You can abbreviate this parameter by omitting RETRY= and specifying a value for r.




MODE - Configure Serial Port.
MODE - Display Device Status.
MODE - Redirect Printing.
MODE - Set Device Code Pages.
MODE - Set Display Mode.
MODE - Set Typematic Rate.

Update to MODE parameter

The RETRY=R setting provides the same support as the P parameter did in previous versions of DOS.

Breaking out of a time-out loop

To break out of a time-out loop, press CTRL+BREAK (^BREAK).

Setting parallel-printer modes

For parallel-printer modes, you can use PRN and LPT1 interchangeably.


Suppose you want to be able to print 80 characters per line and 8 lines per inch on a parallel printer that is connected to the second parallel printer port (LPT2). To do this, type:

    MODE LPT2:80,8

Because 80 characters per line is the default setting, you could achieve the same result by typing:

    MODE LPT2:,8

Suppose that, when printing a file, you want your system to keep trying to print the file until it is successful. To do this, type:

    MODE LPT2:,8,b

To stop your system from continually retrying to print, press CTRL+BREAK (^BREAK) or type the MODE command without specifying a value for r.



External Resident
v1.0? v1.05? v1.1 v1.11 v1.24 v1.25 v1.85 v2.0 v2.01 v2.05 v2.10 v2.11 v2.11R v2.12 v2.2 v2.25 v3.0 v3.20 v3.05 v3.1 v3.21 v3.25 v3.30 v3.3A v3.3R v3.3T v3.31 v3.40 v4.0 v4.01 v4.01A v5.0 v5.0A v5.00.02 v5.001A v5.01 v5.02 v6.0 v6.10 v6.2 v6.21 v6.22 v6.23 v7.00 v7.0R1 v7.10 v8.00
Win95 Win98 WinME
Windows NT
NT3.5 NT4