user3101003
user3101003

Reputation: 25

Put output of command prompt to clipboard

http://i.imgur.com/jrqDJ6s.png

I would like the output of Privkey to be copied to the clipboard. I have found many different commands online, however they copy the file information instead of the output itself. I would just like the output of privkey. If thats not possible to do, even the entire log of the command prompt script saved would still be fine. Basically I just need a way to make it so its possible to copy text from it.

Upvotes: 1

Views: 2196

Answers (3)

foxidrive
foxidrive

Reputation: 41234

This should provide just the Privkey data itself:

@echo off
for /f "tokens=2" %%a in ('vanitygen 1A ^| findstr Privkey ') do echo %%a|clip

Upvotes: 1

Adriano Repetti
Adriano Repetti

Reputation: 67080

You can redirect full output to clipboard with clip.

In your example:

vanitygen 1A | clip

Now you can output only line you're interested to using findstr:

vanitygen 1A | findstr Privkey | clip

In short with | you send output of one command as input of the next one in the chain. findstr will then display only lines that contain given text (Privkey, in this example). Its output will be then sent to clipboard (clip sends its input to clipboard).

Upvotes: 1

user14325
user14325

Reputation: 382

You can redirect the output of every command with | clip to clipboard. For example dir | clip copies a list of the files in the current directory to clipboard.

Upvotes: 5

Related Questions