How can I get a script's output to be copied to the Windows clipboard?

怎甘沉沦 提交于 2019-12-04 07:37:27

There's a utility called clip.exe that you can use. Just pipe the output of your script or any other command into clip.exe (First, put it on your path somewhere. If you don't have a usual place for these kindss of utilities, you can dump it in the directory you usually run your scripts from, or I've known people to use c:\Windows\system32 in a pinch...):

somescript.bat | clip

Then paste away.

In Perl, install and use Win32::Clipboard module

Not sure about the clipboard but you can pipe the output to a text file but doing something like this:

somescript.bat > output.txt
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!