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:
- Configure the printer connected to the parallel port.
- Configure the printer connected to the serial port.
- Displays the status of the printer.
- 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:
- The net print command in Windows
- Netcfg command in Windows
- Nbtstat command in Windows
- Bitsadmin create command in Windows
You should read it
- The net print command in Windows
- How to print the folder content structure in Windows 10
- How to cancel a print job in Windows 8
- How to cancel a print job on Word, Excel
- How to print from the Linux command line
- Relax with 3 ways to print in this simple reverse order
- Steps to disable Print Spooler on Windows 10
- Word tips: Avoid printing unwanted text
- Print () function in Python
- How to print web pages without ads
- How to print Excel, print Excel spreadsheets fast, standard
- How to print A4 to A5 in PDF simple and fast
Maybe you are interested
How to optimize photo collages for social media and printing
How to print horizontally in Word Excel all versions
How to print multiple pages on one sheet of paper in Word 2010, 2013
What is Digital Footprint?
Excel 2016 - Lesson 12: Formatting pages and printing spreadsheets in Excel
How to print multiple Word files at once on your computer