The Print CMD Command is a Windows command line utility that allows users to print text files or other documents from the command line. This command is available in all versions of Windows, from Windows XP to Windows 10. The Print CMD Command is a useful tool for automating the printing of documents, as it allows users to print documents without having to open the document in a word processor or other application. In this article, we will discuss the syntax, options, and user examples of the Print CMD Command.

Syntax of the Print CMD Command

The syntax of the Print CMD Command is as follows:

  • print [/d:device] [filename]

The /d:device option is used to specify the printer device to which the document should be printed. The filename option is used to specify the name of the file to be printed. If no filename is specified, the command will print the contents of the current directory.

Options of the Print CMD Command

The Print CMD Command has several options that can be used to customize the printing process. These options include:

  • /p – This option is used to specify the number of copies of the document to be printed.
  • /t – This option is used to specify the page range of the document to be printed.
  • /c – This option is used to specify the collation option for the document.
  • /f – This option is used to specify the font size of the document.
  • /o – This option is used to specify the orientation of the document.

User Examples of the Print CMD Command

The Print CMD Command can be used in a variety of ways. Here are some examples of how the command can be used:

  1. To print a document to the default printer, use the following command:
    • print [filename]
  2. To print a document to a specific printer, use the following command:
    • print /d:printer_name [filename]
  3. To print multiple copies of a document, use the following command:
    • print /p:number_of_copies [filename]
  4. To print a specific page range of a document, use the following command:
    • print /t:page_range [filename]
  5. To print a document in a specific font size, use the following command:
    • print /f:font_size [filename]
  6. To print a document in a specific orientation, use the following command:
    • print /o:orientation [filename]

Conclusion

The Print CMD Command is a useful Windows command line utility that allows users to print documents from the command line. The command has several options that can be used to customize the printing process, such as specifying the printer device, the number of copies to be printed, the page range, the font size, and the orientation. By using the Print CMD Command, users can automate the printing of documents without having to open the document in a word processor or other application.

Leave a Reply