Home    News    Tool Box    About    Search   
article categories
Food and Cooking
Home Improvement
Personal Finance
Pets and Animals
Pool and Spa
Recreation Vehicle - RV
article categories
How To Videos
SUBMIT ARTICLE Newsletter Signup
Newsletter Archive
DIY Links and Resources
Advertise Here

Interstate Batteries.com

Once You Know, You Newegg

Tool King Service, Selection, Satisfaction

Killer Command Line Tips 1

One of the most clumsy aspects of using the Windows command line is traversing the file system directories. Here are a few tips to save some keystrokes and time.

1) Use directory name masking. Did you know that you can use * as a mask in the CD command?
Example: cd \brainstrain
This can be shortened to cd \br*
The typed out portion must be unique or it will change to the first directory name that matches the mask.

2) When you CD to a long directory name with spaces in it where you would quote the name like "program files" you can leave out the last quote.
Example: cd "\program files"
can be shortened to cd "\program files
and... using tip 1 and 2, you can do this
cd "\prog*

3) You can drag and drop a folder from Explorer into a CMD window. Windows will paste in the full directory path including quotes. Once the path is in the CMD window, change focus to the CMD window, hit HOME to get to the beginning of the cmd line, then type cd /d (with insert on), then hit enter.
Note: the /d option of the cd command is only required if you included the drive letter in the path AND the drive is different than the current drive.

4) Use the "Open Command Window Here" power toy found here:

This is the XP version that also works in Windows 2000 (afaik). With this power toy, you simply right click on a folder name in Explorer, then click Open Command Window Here. A new CMD window will be opened with the folder being the current directory.

5) Use environment variables. The following changes to the temp directory:
cd %temp%
or, change to the user profile directory:
cd %userprofile%

Note - Don't use the masking methods in batch files because as directories are added or changed, the mask may not change to the directory name you would expect. Always spell everything out in full in batch files.

These methods work in Windows 2000 and later operating systems (however... not tested with Vista).


Look for more Killer Command Line Tips in the near future.

Fatal error: Uncaught Error: Call to undefined function mysql_pconnect() in /var/www/html/includes/mydb.inc:10 Stack trace: #0 /var/www/html/includes/htfys_author.htm(2): require_once() #1 /var/www/html/htfys/computer/cmd-line-tips-1.php(48): include('/var/www/html/i...') #2 {main} thrown in /var/www/html/includes/mydb.inc on line 10