Print a file or files to a local or network printer.

      PRINT [/D:device] [pathname(s)]

   device    Either a local printer (LPTx, COMx )
             or a network printer by its sharename (\\servername\print_share)

   pathname  The file or files to be printed.

The default device is PRN. The values PRN and LPT1 refer to the same parallel port.
The PRINT command is most often used in conjunction with an LPR print queue - sending plain ASCII text.

All recent versions of Windows have automatic default printer management enabled by default. This can be enabled or disabled via policy:
'User Configuration ➞ Policies ➞ Administrative Templates ➞ Control Panel ➞ Printers': 'Turn off Windows default printer management'.

When printing to file, the destination file must not already exist.
PRINT will add a FormFeed character (ASCII 12) to the end of each print job.


Delete a print job:

Use Control Panel ➞ Printers (GUI) or use

It is possible to delete the spool .spl and .shd files from %SystemRoot%\system32\spool\PRINTERS but this should be a last resort - stop the spooler service before deleting any files.

Status Messages

Many modern laser printers have a status display panel, the 'Ready' message can be changed using HP Job Language (PCL/PJL) like this:
Echo @PJL RDYMSG DISPLAY ="Ready Message" >\\server\printQ
Echo @PJL RDYMSG DISPLAY ="Ready Printer64" >\\printserv1\printer64

It's not essential to include the word "Ready" in the ready message, but the status display has 16 characters, which is usually enough space for "Ready" plus the printer Name/Number. e.g. "Ready Printer123", "Ready Prn1234567", "Ready #123-45678" etc

Note that when a printer error or jam occurs the status message will change, so adding a printer identifier to the status display does not replace the need for a physical label. It can still be very useful when the physical label is wrong or missing.

Printing requires the Spooler service to be running.

“Without books the development of civilization would have been impossible. They are the engines of change, windows on the world, ''Lighthouses'' as the poet said ''erected in the sea of time'.' They are companions, teachers, magicians, bankers of the treasures of the mind, Books are humanity in print” ~ Arthur Schopenhauer

Related commands

Print to File - Configure a printer to always print to a file.
NET PRINT - View and Delete print jobs.
NET VIEW - List all printer share names for a print server.
Defptr - Default Printer. (Win 2K ResKit)
PRNCNFG - Display, configure or rename a printer.
PRINTBRM - Print queue Backup/Recovery.
WMIC PRINTER - Set printing options through WMI.
Q234270 - Group Policies to Control Printers.
HP PCL 5 Printer Language Technical Reference Manual - Full PCL Manual.
Resource Kit: prncnfg.vbs, prndrvr.vbs, prnjobs.vbs, prnmngr.vbs, prnport.vbs, prnqctl.vbs, pubprn.vbs
Equivalent PowerShell: Out-Printer - Send the output to a printer (lp).
Equivalent bash command (Linux): printf - Format and print data.

Copyright © 1999-2024
Some rights reserved