如何使用 Windows 命令获取剪贴板内容? [英] How can you get the clipboard contents with a Windows command?

查看:64
本文介绍了如何使用 Windows 命令获取剪贴板内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,我可以像这样将文件复制到剪贴板:

clip <文件.txt

(现在file.txt的内容在剪贴板中.)

我该如何做相反的事情:

<代码>????>文件.txt

这样剪贴板的内容会在 file.txt 中吗?

解决方案

您可以使用 paste.exe 软件来粘贴您所描述的文本.

http://www.c3scripts.com/tutorials/msdos/paste.html>

有了它你可以做到:

粘贴 |命令

将windows剪贴板的内容粘贴到指定命令提示符的输入处

粘贴>文件名

将剪贴板内容粘贴到指定文件中.

For example, I can copy a file to the clipboard like this:

clip < file.txt

(Now the contents of file.txt is in the clipboard.)

How can I do the opposite:

???? > file.txt

So that the contents of the clipboard will be in file.txt?

解决方案

You can use the paste.exe software in order to paste text just like you are describing.

http://www.c3scripts.com/tutorials/msdos/paste.html

With it you can do:

paste | command

to paste the contents of the windows clipboard into the input of the specified command prompt

or

paste > filename

to paste the clipboard contents to the specified file.

这篇关于如何使用 Windows 命令获取剪贴板内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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