The print command allows users to print a text file to a line printer, in the background.

Availability

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.

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.

  • Availability

  • Print syntax

  • Print examples

  • 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 11

Windows Vista and later syntax

PRINT [/D:device] [[drive:][path]file name[…]]

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

Options:

  • Windows Vista and later syntax.
  • Windows XP and earlier syntax.

print c:\file.txt /c /d:lpt1

Prints the file.txt file to the parallel port lpt1.

The print command is only able to print ASCII text. The /d, /b, /u, /m, /s, and /q switches can only be used once. If you require a different value, the computer must be restarted.

  • 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.