How can I use a batch file to send a text file or a .doc or similar, to a printer plugged into the computer through a USB port?
相关问题
- Inheritance impossible in Windows Runtime Componen
- how to get running process information in java?
- Is TWebBrowser dependant on IE version?
- How can I have a python script safely exit itself?
- I want to trace logs using a Macro multi parameter
相关文章
- 在vscode如何用code runner打开独立的控制台窗口,以及设置好调试模式时窗口的编码?
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- Bundling the Windows Mono runtime with an applicat
- Print background image on every page once
- Windows 8.1 How to fix this obsolete code?
- Python: print in two columns
Also to get the printer name:
It will list all printers like:
And if you know part of the name, you may include it in a variable dynamically with
FOR
.note the double quotes and no white space after
/D:
to be sure it get the right printer.Another method is to set the default printer and print the document through the notepad.
You can use the
PRINT
command like below to printASCII files
. Useprint /?
in command prompt to know more about the command. Here,/D
is the switch fr device name since by default it's LPT1.Also, see this Article for much more information on printing PDF's etc.