Thursday, July 7, 2011

Windows XP DOS Commands and Tricks


Typing DOS commands at the Windows command line is a very efficient and quick way of doing things in Windows XP. Here is a rundown of the most useful DOS commands in Windows XP. Some of these DOS commands are not visual on an alternative.

DOS command-line tools to run at the command prompt of the Cmd.exe command interpreter. To open the command prompt, click Start, click Run, type cmd and click OK.

ipconfig - Windows IP Configuration
Helpful when troubleshooting Internet connection. Displays the current IP address of your computer and the DNS server address. When you ask your ISP for reporting a bad internet connection, he will probably ask, run ipconfig.

fc - Free Beyond Compare in XP
FC is an advanced DOS Command that compares two files and shows the differences between them. Although the file comparison results are not as interactive or Altova DiffDog, fc Beyond Compare is still very useful. You can even synchronize files on fc, the search of a mismatch.

ping - Say hello to another computer
Ping network command followed by informing the web address or IP address on the health of the connection and if the other party answers your handshake request. Ping tool can also be used to display the Web address to a physical IP address to be converted.

Tree - visual directory structure
You often need to take prints of your physical directory structure but XP has no simple "visual" commands for printing the contents of the directory. Here, try the Tree DOS command and export to a text file.

Tree> mydirectory.txt
Print mydirectory.txt

type - open text files sans Notepad
Similar to Unix cat command, Type is my favorite DOS command for displaying the contents of a text files without modifying them. When used in combination with more switch, type splits the contents of lengthy text files into multiple pages. Avoid using the type command with binary files or you'll hear alien PC beeps and see some greek characters on your PC.

attrib - make hidden files visible
Attrib lets you change attributes of System files and even hidden files. This is great for troubleshooting Windows XP. Say your XP doesn't boot ever since you edited that startup boot.ini file (Hidden), use attrib to remove the Hidden attibute and edit the file using EDIT dos command.

assoc - which program will open that .xyz file
The assoc DOS command can be used to either isplay or even modify the file name extension associations. The command assoc .htm will quickly tell you the name of your default web browser (see picture) 

move - more flexible than copy-paste
Suppose you have a lot of XLS and DOC files in your My Documents folder and would only move the XLS files with names ending in 2011. In XP Explorer, you must manually select each file and then copy and paste it into another folder. However, the DOS command sets things much easier. Simply type the following at the command prompt:
* Move 2011.xls c: \ 2011Reports \

find - advanced file search with filter
To the most powerful DOS command and even more useful than the Windows Desktop Search tool or the Windows Search Assistant. The command searches to find specific text in a file or files. After searching the specified file or files, find displays any lines of text that contain the specified string.

Found for the search of your hard disk and the file name on the C: drive that contains the string "Google" with the pipe (|) to the results of a dir command follows immediately available as:
dir c: \ / s / b | find "Google"

Quick tip - Drag to avoid typing : When your command is working on a file or folder, enter the path to this folder after the command. Tap time by selecting the file or folder from Windows Explorer into the command window.

To use the command line at the command prompt, type the following:
CommandName /?


0 comments:

Post a Comment

Twitter Facebook Digg Stumbleupon Favorites More