Solved

Paste commands into a DOS prompt rather than typing them

Posted on 2013-05-17
21
324 Views
Last Modified: 2013-06-04
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

:)
0
Comment
Question by:Steve_Brady
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 3
  • +6
21 Comments
 
LVL 26

Assisted Solution

by:pony10us
pony10us earned 500 total points
ID: 39176112
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
 
LVL 24

Expert Comment

by:aadih
ID: 39176114
What's the problem?  I always do this without having any problems so far.
0
 
LVL 7

Expert Comment

by:msifox
ID: 39176127
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
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 
LVL 26

Expert Comment

by:pony10us
ID: 39176131
@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
 
LVL 3

Expert Comment

by:phoenix5ire
ID: 39176132
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
 
LVL 24

Expert Comment

by:aadih
ID: 39176142
Just like any copy and paste using mouse works. Am I missing something?
0
 

Accepted Solution

by:
Steve_Brady earned 0 total points
ID: 39176144
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
 
LVL 26

Expert Comment

by:pony10us
ID: 39176145
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
 
LVL 69

Expert Comment

by:Qlemo
ID: 39181794
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
 
LVL 43

Expert Comment

by:Steve Knight
ID: 39182115
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
 
LVL 11

Expert Comment

by:paultomasi
ID: 39192933
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
 
LVL 69

Expert Comment

by:Qlemo
ID: 39193568
Paul, you are wrong. Ctrl-V pastes a ^V charachter (which is the ctrl-v character representation).
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 39194019
Agreed there Qlemo unless there is some setting I'm not aware of... would be useful sometimes if there was!
0
 
LVL 45

Expert Comment

by:aikimark
ID: 39194119
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
 
LVL 26

Expert Comment

by:pony10us
ID: 39194437
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
 
LVL 11

Expert Comment

by:paultomasi
ID: 39196536
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
 
LVL 11

Expert Comment

by:paultomasi
ID: 39196565
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
 
LVL 69

Expert Comment

by:Qlemo
ID: 39207939
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
 
LVL 26

Expert Comment

by:pony10us
ID: 39207963
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
 

Author Closing Comment

by:Steve_Brady
ID: 39218381
Thanks for all the responses and comments.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
If like me you are one who spends a lot of time working and scripting with cmd.exe, sometimes it is handy to be able to quickly view a calendar for a given month and year. This script will quickly do just that!  Save the code posted below to a .bat …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question