如何通过dos COMMAND复制和打印文件 [英] how to copy AND PRINT a file through dos COMMAND

查看:75
本文介绍了如何通过dos COMMAND复制和打印文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过dos COMMAND复制和打印文件.
我正在使用
记事本/p d:\\ kkk.txt
指导我.....

how to copy AND PRINT a file through dos COMMAND..
i am using
notepad/p d:\\kkk.txt
guide me.....

推荐答案

^ ]

可以通过几种方法进行复制.从
Printing[^]

Copying can be done a few ways. Start with
copy c:\file.txt c:\file2.txt

开始,并阅读 [ ^ ].

您可以创建批处理(.bat)或命令(.cmd)文件来执行一系列命令行指令.

and read this[^].

You can create a batch (.bat) or command (.cmd) file to carry out a series of command line instructions.


您实际上需要DOS命令吗?我问是因为您调用notepad.exe,它不是DOS命令-它是标准的Windows应用程序.我建议创建批处理文件,并在其中放置两个命令:一个应复制文件,另一个应-打印它.

喜欢,创建文件"MyCopyAndPrint.bat":
COPY%1%2
类型%1> PRN

您将此批处理文件称为

MyCopyAndPrint.bat< FileName> <目的地>

语法可能有所不同: XCOPY [复制 [ ^ ],在%1"和%2"(其中分别是源和目标),打印 [ PRN或LPTx [ ^ ]设备. ..结果基本相同:)
Do you actually need DOS command? I ask because you call notepad.exe, which isn''t a DOS command - it is standard Windows application. I would suggest creating batch file and placing two commands inside: one should copy file, and another - print it.

Like, create file "MyCopyAndPrint.bat":
COPY %1 %2
TYPE %1 > PRN

You call this batch file like

MyCopyAndPrint.bat <FileName> <Destination>

There may be variations of the syntax: XCOPY[^] instead of COPY[^], quotes around "%1" and "%2" (which are source and destination, respectively), usage of PRINT[^] command instead of redirecting output to PRN or LPTx[^] devices... the result is basically the same :)


这篇关于如何通过dos COMMAND复制和打印文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆