Windows Tip: Fun With DOS



By Kate Botello

Don't forget about DOS! Used to be, you had to know DOS to run
 Windows. Now, you don't. Still, it comes in handy a lot! So here
 are Kate and Leo's top DOS commands, plus a handy reference list
 for DOS commands you'll be glad you can still use. 

FDISK /MBR 

Repairs the master boot record on your computer. It's a great
 last-ditch troubleshooting step to run before you totally
 reformat your machine. 

The Master Boot Record usually resides on the first sector of
 your hard drive. The program begins the boot process by looking
 up the partition table to determine which partition to use for
 booting. It then transfers program control to the boot sector
 of that partition, which continues the boot process. That's why
 it's a particularly nasty place for viruses-- it loads every
 time you boot your computer, and controls what boots where. 

If you kill your MBR, your machine won't know what to do with
 itself. FDISK /status will give you the partition information
 of your drive. 

ATTRIB 

Sets or displays the attributes for your files. Type in ATTRIB
 with the following switches:

-r read/write 
+r read only (if you want to delete a file, you must first make
   it read/write) 
+h makes hidden file 
-h reveals hidden file 
+a archives the file-- makes it available for archiving when
   using BACKUP or XCOPY 
-a removes archiving 
+s sets system attribute-- marks the file as a command file used
   only by DOS 
-s turns off system attribute 
/s sets attributes on subdirectories found within the
   specified path.

Two More Favorite DOS Commands

FORMAT (including switches /s, /q, /u) 

Sure you know how to format your hard drive. But have you used
 switches lately? No, I'm not talking about twigs from a tree
 your mama used to whup you with.... 

A lot of people make a crucial mistake when they format their
 hard drives-- they leave it naked, without an operating system.
 Without an OS, your machine is just a bag of bolts with
 electrical current running through it. 

The switch /s formats and leaves the system on the disk. /Q means
 "quick", do it fast. It's like doing a quick format on a floppy
 disk. It just erases the data without formatting one sector at a
 time. /U eliminates the backout "undo" option, so you can't
 UNFORMAT your hard disk. 

DELTREE 

DELTREE is a great shortcut for deleting huge directories. Let's
 say you uninstalled a program but it left tiny little files in a
 big, complicated directory string: C:PROGRAM FILESLAME
 PROGRAMSAVED FOLDERSEXTRA STUFF. 

If you type DELTREE C:PROGRAM FILESLAME PROGRAM it'll remove the
 LAME PROGRAM directory and all its subdirectories AND everything
 in them. Nuke-o-rama!! DELTREE gives you a Y/N option to turn
 it off. 

Because you're SURE what you're doing, type DELTREE with the
 switch /Y - deltree YES! Then it won't ask you to confirm. 

Here are our a few more of the commands Kate uses regularly:

MD make directory 
RD remove directory 
DIR /w show directory listing, wide on the screen so you can
 read it

Many thanks to Dr. Everett Murdock's DOS Command Index
 <http://www.easydos.com/dosindex.html>. Check out the site for
 a great quick reference to the wonderful world of DOS. 

Learn to speak Windows's unspoken language... and make it do
 your bidding!
