Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a script (batch file) to store some inside clipboard, and I need to automatize running and pasting action with auto hot key.

I tried the following code, but the code doesn't work with cmd.exe. I expect a function something like 'Paste clipboard'.

Run "SCRIPT.bat"
Send {Control down}V{Control up}
share|improve this question
up vote 2 down vote accepted

In a Command Prompt, Ctrl+V doesn't paste the clipboard.

One way you can paste the clipboard in a Command Prompt is Alt+Space, E, P. So you might try

Send !{Space}ep

To paste to other Windows programs as well, you can check if the current window is a Command Prompt or not as follows

IfWinActive, ahk_class ConsoleWindowClass
  Send !{Space}ep
  Send ^v
share|improve this answer
It works fine with command line, but it doesn't work with other app. – prosseek Sep 15 '11 at 16:26
@prosseek I added a way to check if the current window is a Command Prompt to my answer. – Bavi_H Sep 16 '11 at 4:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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