MS-DOS and Windows command line print command
If you need to print a file that cannot be opened from a command line (e-mail, picture, document, etc.) you must use a different program. See: How to print a document, picture, or another file.
Print is an external command that is available for the following Microsoft operating systems. Print was first introduced in MS-DOS 2.0 as print.com and later was changed to print.exe in MS-DOS 5.0 and all later versions of MS-DOS and Windows.
- MS-DOS 2.0 and above
- Windows 95
- Windows 98
- Windows ME
- Windows NT
- Windows 2000
- Windows XP
- Windows Vista
- Windows 7
- Windows 8
- Windows 10
Windows Vista and later syntax
PRINT [/D:device] [[drive:][path]file name[...]]
|/D:device||Specifies a print device.|
Windows XP and earlier syntax
print /d:device /b:size /u:ticks1 /m:ticks2 /s:ticks3 /q:size /t drive:\path\ file name /c /p
|/d:device||Name of the printer device.
Printer Ports: LPT1, LPT2 or LPT3.
Serial Ports: COM1, COM2, COM3 or COM4.
|/b:size||Sets size (in bytes) of the internal buffer. Default=512 with a range of 512 to 16384.|
|/u:ticks1||Maximum number of clock ticks PRINT is to wait for a printer to become available. Default=1 with a range of 1 to 255.|
|/m:ticks2||Maximum number of clock ticks PRINT can take to print a character. Default=2 with a range of 1 to 255.|
|/s:ticks3||Maximum number of clock ticks allocated for background printing. Default=8 with a range of 1 to 255.|
|/q:qsize||Maximum number of files allowed in print queue. Default=10 with a range of 1 to 255.|
|/t||Removes files from the print queue.|
|drive:\path\ file name||Location and file name of the file to be printed.|
|/c||Removes files from the print queue.|
|/p||Adds files to the print queue.|
print c:\file.txt /c /d:lpt1
Prints the file.txt file to the parallel port lpt1.
- How to print DOS output to printer.
- How to print a document, picture, or another file.
- See our print definition for further information and related links on this term.