I want to learn to use the command prompt better on Windows to have more control over what I do and just for the learning experience. The main annoyance I have right now is all of the typing. If I want to perform an operation on a file with a large path I'm sitting there typing it out for a minute at least, and if I make a mistake I have to press the up arrow key and scroll through the entire thing and find what I did wrong. Is there any tools to make this easier?
feedback
|
|
If you intend to use the command prompt only under Windows, you could use Windows PowerShell, as it is easier to use than the initial command prompt, and copies some behavior from the *nix-like terminals. (It provides also a lot more functionalities, but at first, at least to me, it's an "easier command shell").
Edit: Changed picture for a more "friendly" one. | |||||||||||||||||
feedback
|
|
You can use the Tab key to auto-complete file names. Although keep in mind you must first type enough of the file name to uniquely identify it or else you will have to shuffle through incorrect matches. For example, you have a folder with these files and it is your current directory that you're sitting in with . .. Su.exe Sup.txt SuperUser.COM if you wanted to auto-complete Another trick is if you have the file in an explorer window, you can drag it into the | |||||||||||||
feedback
|
|
Here are some more tips and tricks in using the command prompt including:
This is yet another way to reduce the amount of typing involved in long file paths. | |||||||||||||
feedback
|
|
Here’s the complete list of function key actions :
| ||||
feedback
|
|
Pressing F7 will list the last executed commands.
| |||||||||
feedback
|
|
Often you can reduce your typing by being in the correct directory. You can open a command shell in the directory you see in an Explorer window by adding cmd.exe in the folder type associations. (Tools - Folder Options - File Types - Folder - Advanced - New - cmd) Then, when you select cmd by right-clicking on that folder the command window that opens will have as its current directory that of the folder you clicked on.
| |||||||
feedback
|
|
If Windows PowerShell is too overwhelming, there are also some cmd replacement shells:
And more can be found via google. | |||||||||||
feedback
|
|
Something I use constantly while using command prompt is the up arrow (and down arrow) to scroll through recently used commands. Especially when I've entered a long command and only wish to edit some part of it without retyping it. A short example, if you:
And then want to ping another similar address, you can simply press the up arrow. The command appears on the prompt with the cursor at the end. This makes it easy to backspace once and change the address to 192.168.1.2 or something similar. | ||||
|
feedback
|
|
I suggest that you use the command prompt. I know, it seems facetious, but this is serious---if not instantly helpful---advice. There is a lot to know, and to absorb it deeply, you have to use it over and over again. | |||||||||||
feedback
|
|
Enable quick edit mode to:
I also change the Font and the layout to something more pleasant than the default bit map.
Finally add more rows and columns the the editing window, and more rows to the buffer.
Screenshots are in spanish, but they are exactly in the same place in english | |||||||
feedback
|
|
Definitely grab a copy of Cygwin, and add its \bin folder to your PATH variable. It's like a usable command prompt! But really, the only way to get used to it is to get used to it, so use it! | ||||
|
feedback
|
|
If you're using XP (don't know about Vista) you can download a powertoy that adds an "Open command window here" menu entry to your explorer folder context menu. Something else that I've found useful is to stop using the windows default paths for everything. They are just too hard to remember and the spaces can become a problem. Using something more like linux' directory structure can be a real time saver. My directories look something like this (by way of examples):
Way easier to remember. | |||||||||
feedback
|
|
Personally I think that if you want to learn to use the Command Prompt and are not finding it joyful, you probably don't need to use the Command Prompt. As soon as you need to hit a CLI, you will find it useful, and even pleasant. If you're trying to do your day-to-day tasks with it, then you're bashing your head against a wall. Once you are familiar with the command prompt, you may migrate your day to day tasks there just because it's easier than always reaching for the mouse :) | ||||
|
feedback
|
|
Make use of environment variables. For example, instead of typing c:\documents and settings\username you can simply use %userprofile%. For a list of standard environment variables, type SET and press enter on a command prompt. In addition, get familiar with commands that are available to you - I like two sites for them: www.ss64.com and www.robvanderwoude.com You can also learn batch scripting - using that, you can automate frequently used tasks. | ||||
|
feedback
|
The latter tip may sound kind of obscure, but when you spend a lot of time in the console it can be much faster and easier than pressing the up arrow or F8 several times. | ||||
|
feedback
|
|
There are some great tips posted in this thread! In my opinion posting CMD replacements is rather 'Off Topic'. But it seems to be OK here so I might add ColorConsole to the list. The tabbed interface, Favorite Commands menu, Copy/Cut & Paste and indeed HTML export are very useful features that I don't want to miss anymore. p.s.: try this in the "Must have Firefox addons" thread: Lads, get Opera, it's got the goodies aready built in! :) | ||||
|
feedback
|
|
You may find "Useful Command-line Commands on Windows" from Server Fault helpful. Actually, there are quite a few interesting command-line questions there, go have a look. | ||||
|
feedback
|
|
I agree with the suggestion to use powershell. In addition I find it incredibly useful to set up functions and aliases to reduce common tasks to fewer letters typed. For example, to launch a http link I set this up in my powershell profile:
and then I just type Another example for listing files or directories:
And then I use I use | ||||
|
feedback
|
|
Install the Windows Explorer replacement Xplorer2. It includes a command prompt tool that allows all functions of the command prompt ALONG WITH the Windows GUI like use of the mouse, right-click for copy-paste functions etc. Take a look the screenshot below.
| ||||
|
feedback
|






