Home    News    Tool Box    About    Search   
article categories
Automotive
Computer
Electronics
Food and Cooking
Home Improvement
Household
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

Sealed Lead-Acid Batteries at interstatebatteries.com

123inkjets.com - Printer Ink, Toner, & More

Great Deals Every Day @ Geeks.com

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:
http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx

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).

Enjoy!

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

Author: FixingStuff
Article Date: 06-07-2007

  Did You Know...  
Penguins "fly" underwater at up to 25 miles per hour.
Source: fun-facts.com

Fun fact# 30

    © DC Systems 2014    
home | news | Tool Box | contact
      Get Firefox!