[英]Combining two files into a single in windows command only result in the first file being copied
This should be a fairly straightforward operation, but I'm puzzled as to why it is not working. 这应该是一个相当简单的操作,但是我对为什么它不起作用感到困惑。
The following commands in windows results in only the first file being copied to destination file report.rtf Windows中的以下命令导致仅将第一个文件复制到目标文件report.rtf
copy /b *.rtf report.rtf
or 要么
type *.rtf >> report.rtf
If you want to add a second file to an existing file, try 如果要将第二个文件添加到现有文件,请尝试
copy /b report.rtf+secondFile.rtf report.rtf
The "+" should combine them (assuming by "combine" you mean "concatenate"). “ +”应该将它们组合起来(假设用“ combine”表示您是“ concatenate”)。
Changing the report.rtf
at the end to another file will let you put them into a new file, of course. 最后,将
report.rtf
更改为另一个文件,将使您可以将它们放入新文件中。
NOTE: In Windows 8.1 (and probably Windows 7 and Windows 8) doing this as a normal user will not work! 注意:在Windows 8.1(可能是Windows 7和Windows 8)中,以普通用户的身份执行此操作将无效! Instead, run cmd.exe (command prompt) as an Administrator (right-click, Run as Administrator).
而是,以管理员身份运行cmd.exe(命令提示符)(右键单击,以管理员身份运行)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.