The print command in Windows

The print command sends text files to the printer.

To learn more about how to use this command, see the example at the end of the article.

Syntax print command

 Print [/ d:] [:] [] [.] 

The command parameter print

Parameters

Describe

/ d:

Specify the printer you want to use.To print to a locally connected printer, specify the port on your computer (printer location is connected).

- Valid values ​​for parallel ports are LPT1, LPT2 and LPT3.

- Valid values ​​for serial ports are COM1, COM2, COM3 and COM4.

You can also specify a printer network by using its queue name (Server name * Printer name *).If you do not specify a printer, the print job will be sent to LPT1 by default.

:

Specify the logical drive or physical drive where the file you want to print is located (where the print file is stored).This parameter is not required if the file you want to print is already on the current drive.

 

Specify the location of the file you want to print.This parameter is not required if the file you want to print is in the current directory.

[.]

Reference is required.Specify the file you want to print.You can attach multiple files in one print job.

/?

Show help at thecommand prompt.

Command statement print

A file can be printed in the background if you send it to a printer connected to a serial or parallel port on the local computer.

You can perform many configuration tasks from thecommand promptusing the Mode command.

Refer to the Mode command for more information on:

  1. Configure the printer connected to the parallel port.
  2. Configure the printer connected to the serial port.
  3. Displays the status of the printer.
  4. Set up a printer to convert code pages.

Example print command

To send the Report.txt file in the current directory to the printer connected to LPT2 on the local computer, enter:

 print / d: lpt2 report.txt 

To send the Report.txt file in folder c: Accounting to the queue in Printer1 on the CopyRoom server, type:

 print / d: copyroomprinter1 c: accountingreport.txt 

See more:

 

  1. The net print command in Windows
  2. Netcfg command in Windows
  3. Nbtstat command in Windows
  4. Bitsadmin create command in Windows

 

3.3 ★ | 3 Vote

May be interested

  • Sub-commands in nslookup Windows command (Part 3)Sub-commands in nslookup Windows command (Part 3)
    nslookup set recurse, nslookup set retry, nslookup set root, nslookup set search, nslookup set srchlist, nslookup set timeout, nslookup set type, nslookup set vc, and nslookup view in windows
  • Command at in WindowsCommand at in Windows
    the at command schedules commands and programs to run on a computer at a specified time with a specific date. you can only use the command at when schedule service is running.
  • How to restart the Print Spooler service on WindowsHow to restart the Print Spooler service on Windows
    service print spooler is an essential for printing documents on any windows operating system. it is responsible for managing print jobs sent from the computer to the printer and can be dysfunctional due to errors or corrupted files.
  • Set command in WindowsSet command in Windows
    the set command helps show, set or remove cmd.exe environment variables.
  • Del command in WindowsDel command in Windows
    the del command deletes one or more files. this command is the same as the eraser command.
  • Word tips: Avoid printing unwanted textWord tips: Avoid printing unwanted text
    you can still edit documents every day with a word program, but because the information security requirements you absolutely cannot print once it is not needed. however, the print function on the word toolbar is always available to execute the print command for d & ugr
  • 10 useful commands in Windows you should know10 useful commands in Windows you should know
    command prompt is used to execute batch files, perform tasks quickly, help you troubleshoot and solve some windows problems when the system crashes. however, not all commands in windows are useful and must be done regularly. with the 10 command lines in the following article it is very useful even if you are not an administrator.
  • Relax with 3 ways to print in this simple reverse orderRelax with 3 ways to print in this simple reverse order
    there is always a right way to print your documents. some inkjet printers print pages from the top, which means you have to manually reverse the print order. this is not a problem when printing only a few pages, but when you print a few hundred pages of documents then you need a trick to print them in reverse order so you can arrange them neatly.
  • How to save command line output to file on Windows, Mac and LinuxHow to save command line output to file on Windows, Mac and Linux
    when you run a terminal command, it will usually print the output in the terminal so you can read it immediately. however, sometimes you will want to save the output for later analysis or combination with another tool.
  • How to use Share 2 Print images, content on Windows 10How to use Share 2 Print images, content on Windows 10
    share 2 print adds printing to uwp applications that are not supported for printing on windows 10.