PRINT (command)

From Wikipedia, the free encyclopedia
  (Redirected from Print (command))
Jump to: navigation, search

In computing, PRINT is a command in the command line interpreters (shells) of DOS, OS/2 and Microsoft Windows. It is used to add a text file to the print queue.[1] Because of the text file limitation it is not equivalent to the lpr command in the Berkeley printing system or the lp command in the System V printing system[why?] (both available in the CUPS printing system).[2][3]

The command was introduced in MS-DOS version 2.[4] Another option to print files is to use the COPY command to copy files to one of the printer ports LPT1: to LPT3:.

Syntax[edit]

Microsoft Windows[edit]

Syntax to print a file:

PRINT [/D:device] [[drive:][path]filename[...]]

Arguments:

  • /D:Device This command-line argument specifies the print device.
  • drive:\path\filename Specifies the location of the file to be printed.

OS/2[edit]

Syntax to print a file:

PRINT [/D:device][/B] [drive:][path] filename[...]

Syntax to cancel a file that is printing or queued:

PRINT [/D:device][/C or /T]

Arguments:

  • /D:device This argument specifies the print device, for example: /D:LPT1.
  • drive:\path\filename Specifies the location of the file to be printed.

Options:

  • /B Specifies the file is a binary file.
  • /C Cancels the file that is currently printing.
  • /T Cancels all files from the print queue, including the file that is currently printing.

DOS[edit]

Arguments:

  • /D device Specifies the name of the print devices. Default value is LPT1.
  • /P filename Add files in the print queue.
  • /C filename Removes a file from the print queue.

Options:

  • /T Removes all files from the print queue.

Example[edit]

PRINT C:\DOCS\LETTER.TXT

See also[edit]

References[edit]

  1. ^ Microsoft, Microsoft Windows Client TechCenter, retrieved on 17 December 2010
  2. ^ cups.org, CUPS 1.4 lp documentation, retrieved on 17 December 2010.
  3. ^ cups.org, CUPS 1.4 lpr documentation, retrieved on 17 December 2010.
  4. ^ Computer hope, MS-DOS print command help, retrieved on 17 December 2010.