windows 如何通过CMD打印?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5104930/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to print through CMD?
提问by Anil
I have a file which I'd like to print using system CMD. I used the command NET USE
with the following syntax as mentioned below:
我有一个文件,我想使用系统 CMD 打印它。我使用了NET USE
具有以下语法的命令,如下所述:
net use LPT1 \machine name\printer name ..\file name.
While using this command I see nothing is the printing, help me.
使用此命令时,我看不到任何打印内容,请帮助我。
采纳答案by TToni
The "net use" command just sort of gives the printer a name (in this case LPT1). The file parameter is useless there.
“net use”命令只是给打印机一个名称(在本例中为 LPT1)。文件参数在那里没用。
After you have mapped the printer with "net use" like in you example, you can redirect output to it, for example with type 'file name' > lpt1:
在您像示例中一样使用“net use”映射打印机后,您可以将输出重定向到它,例如 type 'file name' > lpt1: