In a couple of my previous posts I've covered running various commands from a command window like the one shown to the left. Now while the command window is a simple application, which provides a way to run other applications or Windows commands, how to do some simple things in it is not always clear.
For example I have run into many situations where someone does not know how to copy the text from the command window. When helping someone in an online forum having the person copy and paste the information from a command window helps insure that the information that is posted is correct. Because of that, I figured a quick overview of working with the command might be useful.
The first hurdle to get over is launching the command window in order to run a command. As I mentioned in my other posts there are several ways that a command window can be launched and at times that can cause issues. The biggest issue I've seen here is someone launching a command window from the Run... dialog and specifying the command to run. By default when a command window is launched with a command, it will run the command and exit when the command finishes, this results in the command window showing up briefly and closing. In most cases this is not what we want to do as we're usually interested in the output of the command being run. This problem is solved by supplying the keep option (/k), which tells the command window to stay open after the command that is supplied finishes.
Once you have run the command, the next question is often what can I do with the information shown in window. Unlike most standard Windows applications Ctrl-C cannot be used to copy the text shown in a command window. There are actually two ways to select and copy from a command window and which one you need to use depends on the settings of the command window.
First lets look at the default behavior for copy and paste in a command window as that is the most common way it is done. By default selecting the text to be copied is done by right clicking in the command window and either selecting Select All, to get all the text in the window even that which has scrolled off the window, or selecting Mark, to be able to highlight only the text you want. If you select Mark, then you must left-click and drag to highlight the text you wish copy. Once you have the text highlighted by using either Mark or Select All, then right-click in the window to copy it to the Window's clipboard.
Alternatively, a command window can have Quick Edit Mode enabled, which allows you to highlight text to be copied without having to right-click and select Mark. To enable Quick Edit Mode, you right-click on the title bar of the command window and select Properties. This will bring up the properties dialog where you can set Quick Edit Mode along with other options.
When you you exit this dialog on Windows XP, you will be asked if the change is for this window or if the shortcut should be changed. This allows you to change how just the current window behaves or how all future command windows will behave. Starting with Windows Vista, if you want to change how all future command windows should look and behave, then you select Defaults instead of Properties from the menu.
Now once you are using a command window with Quick Edit Mode set, you no longer need to right click and select Mark in order to select what should be copied. Instead you press the left mouse and highlight the desired text. Once you have what you want highlighted, all you have to do is right-click to copy it.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment