Skip to content

PRINT Windows Command Guide

The Windows print command allows users to print documents directly from the command line, providing a quick and efficient way to send files to a printer. By utilizing various options and parameters, such as specifying the printer name or setting printing preferences, users can customize their printing tasks to meet their specific needs. This guide will walk you through the different functionalities of the Windows print command, enabling you to effectively manage your printing tasks with ease.

Terminal window
print [/D:device] [[drive:][path]filename ...]

Options:

OptionDescription
/DSpecifies the print device.

Parameters:

ParameterDescription
/D:device Specifies the print device
filenameSpecifies the file(s) to print
driveSpecifies the drive containing the file to print
pathSpecifies the directory containing the file to print
Terminal window
print C:\Users\username\Documents\example.txt

Prints the content of the text file “example.txt” located in the specified directory.

Terminal window
print C:\Users\username\Documents\example.pdf

Prints the content of the PDF document “example.pdf” located in the specified directory.

Terminal window
print C:\Users\username\Documents\example.docx /#2

Prints 2 copies of the Word document “example.docx” located in the specified directory.

Terminal window
print C:\Users\username\Documents\example.jpg /D:PrinterName

Prints the image file “example.jpg” to the printer with the name “PrinterName”.

Terminal window
print C:\Users\username\Documents\example.docx /COLOR

Prints the Word document “example.docx” located in the specified directory in color.

Terminal window
print /D:PrinterName /T

Sends a test page to the printer with the name “PrinterName” to check printer functionality.

Terminal window
print C:\Users\username\Documents\*.*

Prints all files within the specified directory “Documents”.

How do I use print in Windows?

To use the print command in Windows, execute the following command:

Terminal window
print /D:\\COMPUTER\PRINTER C:\Users\Username\Documents\example.txt

How can I print to a specific printer in Windows CMD?

To print to a specific printer in Windows CMD, you can use the following command:

Terminal window
print /D:\\COMPUTER\PRINTER C:\Users\Username\Documents\example.txt

How do I list all available printers using the print command in Windows?

To list all available printers using the print command in Windows, you can run the following command:

Terminal window
wmic printer get name

How can I set printing options with the Windows print command?

To set printing options with the Windows print command, use the following command syntax:

Terminal window
print /D:\\COMPUTER\PRINTER /o l /t:50 C:\Users\Username\Documents\example.txt

Can I print multiple copies of a file using the Windows print command?

Yes, you can print multiple copies of a file using the Windows print command by specifying the number of copies. Here is an example command:

Terminal window
print /D:\\COMPUTER\PRINTER /c:2 C:\Users\Username\Documents\example.txt

How do I cancel a print job with the print command in Windows CMD?

To cancel a print job with the print command in Windows CMD, use the following command:

Terminal window
echo off > \\COMPUTER\PRINTER

Applications of the PRINT Command

  • Printing a text file
  • Redirecting output to a printer
  • Specifying printer settings
  • Printing multiple copies of a document
  • Printing a specific range of pages