1

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.

3 Answers 3

5

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.

0
1

This should provide just the Privkey data itself:

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

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).

1
  • Thank you! This worked perfectly! Would it also be possible to remove the "Privkey: " from it, so it only displays the code? Commented Jan 12, 2014 at 21:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.