Windows XP DOS Commands And Tricks


Very few of us know some trick of CMD of windows XP i have used many and also known some. So i have created a list of useful Win XP CMD tools that can be used.

Hope it helps you!!!!

ipconfig – Windows IP configuration

Useful for troubleshooting your internet connection. Displays the current IP address of your computer and the DNS server address. If you call your ISP for reporting a bad internet connection, he will probably ask you to run ipconfig.

fc – Free BeyondCompare in XP

FC is an advanced DOS Command that compares two files and displays the differences between them. Though the file comparison results are not as interactive as BeyondCompare or Altova DiffDog, fc is still very useful. You can even set fc to resynchronize the files after finding a mismatch.

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.

ping – Say hello to another computer

Ping network command followed by the web-address or IP address tells you about the health of the connection and whether the other party is responding to your handshake request. Ping tool can also be used to convert the web address to a physical IP address.

tree – visual directory structure

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

tree > mydirectory.txt

print mydirectory.txt

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

Say you got a lot of XLS and DOC files in you MyDocuments folder and want to move only those XLS files that have their name ending with 2006. In XP Explorer, you have to manually select each file and then cut-paste to another folder. However, the DOS move command make things much simpler. Just type the following at the command prompt:

move *2006.xls c:\2006Reports\

bootcfg

Configures, queries, or changes Boot.ini file settings.

defrag

Locates and consolidates fragmented boot files, data files, and folders on local volumes.

diskpart

Manages disks, partitions, or volumes.

driverquery

Queries for a list of drivers and driver properties.

eventcreate

Enables an administrator to create a custom event in a specified event log.

eventquery

Lists the events and event properties from one or more event logs.

eventtriggers

Displays and configures event triggers on local or remote machines.

fsutil

Manages reparse points, managing sparse files, dismounting a volume, or extending a volume.

getmac

Obtains the media access control (MAC) address and list of network protocols

helpctr

Starts Help and Support Center.

ipseccmd

Configures Internet Protocol Security (IPSec) policies in the directory service, or in a local or remote registry. Ipseccmd is a command-line version of the IP Security Policies Microsoft Management Console (MMC) snap-in.

logman

Manages and schedules performance counter and event trace log collections on local and remote systems.

openfiles

Queries, displays, or disconnects open files.

pagefileconfig

Displays and configures the paging file Virtual Memory settings of a system.

perfmon

Enables you to open a Performance console configured with settings files from Windows NT 4.0 version of Performance Monitor.

prncnfg

Configures or displays configuration information about a printer.

prndrvr

Adds, deletes, and lists printer drivers from local or remote print servers.

prnjobs

Pauses, resumes, cancels, and lists print jobs.

prnmngr

Adds, deletes, and lists printers or printer connections, in addition to setting and displaying the default printer.

prnport

Creates, deletes, and lists standard TCP/IP printer ports, in addition to displaying and changing port configuration.

prnqctl

Prints a test page, pauses or resumes a printer, and clears a printer queue.

relog

Extracts performance counters from performance counter logs into other formats, such as text-TSV (for tab-delimited text), text-CSV (for comma-delimited text), binary-BIN, or SQL.

sc

Retrieves and sets information about services. Tests and debugs service programs.

schtasks

Schedules commands and programs to run periodically or at a specific time. Adds and removes tasks from the schedule, starts and stops tasks on demand, and displays and changes scheduled tasks.

shutdown

Shuts down or restarts a local or remote computer.

systeminfo

Queries the system for basic system configuration information.

taskkill

Ends one or more tasks or processes.

tasklist

Displays a list of applications, services, and the Process ID (PID) currently running on either a local or a remote computer.

tracerpt

Processes event trace logs or real-time data from instrumented event trace providers and allows you to generate trace analysis reports and CSV (comma-delimited) files for the events generated.

typeperf

Writes performance counter data to the command window or to a supported log file format.

WMIC

Eases the use of Windows Management Insturmentation (WMI) and systems managed through WMI.