Paste commands into a DOS prompt rather than typing them

Hello,

This question exposes the laziness [:P] (or perhaps we can call it the desire for greater efficiency) in modern computing but:

Is there a way to paste commands into a DOS prompt rather than typing them?

Thanks

:)
Steve_BradyAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Steve_BradyConnect With a Mentor Author Commented:
Thanks for the responses

>>pony10us
you can right click on the top (title) bar and go to edit/paste


Aha! That's nice to know. I'm so used to using Ctrl+v (which obviously does not work in DOS) that I was concerned it might not be possible.

FYI, I noticed that (in Windows 7) you can save a step by right-clicking anywhere in the black to get a menu with the option to Paste whereas right-clicking the title bar gives you Edit and then Paste in the next menu.
0
 
pony10usConnect With a Mentor Commented:
When in the command prompt window, if you have already copied the command to the clipboard, you can right click on the top (title) bar and go to edit/paste
0
 
aadihCommented:
What's the problem?  I always do this without having any problems so far.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
msifoxCommented:
If you prefer to do it with keyboard:
Alt plus Spacebar will open the same context menu as right-click on title bar does.
Then look which letters are underlined, they can be typed (e for edit, p for paste).
That's how I always do it.
0
 
pony10usCommented:
@msifox

reminds me of the old days when using edit.com to write programs in basic.  Windows 3.0 and 3.1 we used the Alt key to bring up the top menu all the time.  We didn't need to use the spacebar though.  :)
0
 
phoenix5ireCommented:
Depending on your OS, there are several ways of doing it but sometimes, a little visual is quicker to explain so I'll be lazy here as well:
Copy / Paste via Command prompt
0
 
aadihCommented:
Just like any copy and paste using mouse works. Am I missing something?
0
 
pony10usCommented:
I noticed that as well after some of the other comments.  

Now if they would only come up with a way to permit the keyboard shortcuts Ctrl+c and Ctrl+v for copy/paste even I might be happy.  Probably not though.  :(
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
The setting responsible to allow to "click in the black" to get the menu is called Quick Edit Mode. It is located in the cmd.exe window's properties, Options tab, and is also responsible for marking text if you left-click into the cmd window (to actually copy the selection to the clipboard, press Return).
0
 
Steve KnightIT ConsultancyCommented:
Or to state the obvious, use a batch file -- You could also just put them into notepad and save-as type="all files" and save as whatever.cmd or whatever.bat and run that from cmd.exe prompt, or from shortcut etc.

I use the right click / paste all the time though :-)
0
 
Paul TomasiCommented:
When you say 'command prompt' do you mean cmd.exe or command.com?

'CTRL-V' definitely pastes the clipboard's contents into a CMD box.
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Paul, you are wrong. Ctrl-V pastes a ^V charachter (which is the ctrl-v character representation).
0
 
Steve KnightIT ConsultancyCommented:
Agreed there Qlemo unless there is some setting I'm not aware of... would be useful sometimes if there was!
0
 
aikimarkCommented:
A right mouse click is the first step in pasting into a command prompt window.

If you do not have a mouse, then you can use the following keystroke sequence:
Alt+Spacebar
E
P

Open in new window

0
 
pony10usCommented:
If you don't mind a third party app to be able to use CTRL+V you can always look at AutoHotKey:  http://www.autohotkey.com/  And a script for this function can be found:  http://www.howtogeek.com/howto/25590/how-to-enable-ctrlv-for-pasting-in-the-windows-command-prompt/
0
 
Paul TomasiCommented:
Qlemo

It's been a long time since we've communicated to each other. You know I have a lot of respect for you. We did some pretty cool batch stuff way back.

Paul, you are wrong. Ctrl-V pastes a ^V charachter
I stand to be corrected. You are right. Funnily enough, I do so much stuff in DOS, editing inside a DOS box has become so automatic I don't notice I am pulling up a menu to paste. I've forgotten how much this used to bug me in the early days. Lol.
0
 
Paul TomasiCommented:
You can turn on 'QuickEdit Mode' for a DOS box.

To paste from another application into the DOS: click the right mouse button.

To copy a 'word' from DOS: double-click a word with the left mouse button.

To copy a phrase from DOS:  click the left mouse button while dragging the mouse over the phrase, then click the right mouse button.

Copying from another application is straightforward (e.g., CTRL-C) and use the paste method as described above.

Pasting into another application is straightforward...

NOTE: When pasting into a DOS box, if you inadvertantly click the right mouse button (which puts you in Edit Mode) press the ESC key or any of the following: arrow keys, backspace key, DEL key, RETURN key, etc. to return to non-edit mode.
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Don't you think my additional explanation in http:a39181794 is worth to get included? It is less about the points (50 or so would be ok), more about having that post prominent, as Quick Edit Mode is something many folks do not know about (the default and what it effects).
0
 
pony10usCommented:
Qlemo:

Actually, I think there were several answers that deserve the recognition. I was not aware of the Quick Edit Mode myself. I have just been doing it the way I described initially for a long time.
0
 
Steve_BradyAuthor Commented:
Thanks for all the responses and comments.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.