BOOT CAMP ARCHIVE 2000

  

 

BOOT CAMP 115

INTRODUCING DOS, PART 3

If you have been following the last two episodes of Boot Camp you should now have fair idea of what MS-DOS is all about and how it can be used for simple tasks, like recovering files and documents after a Windows crash. This week, in the final instalment of this short series, we’re looking at some of the more powerful DOS commands and conventions that could come in handy one day if your PC starts misbehaving.

Don’t try any of these examples unless you are confident of your abilities. If you are unsure then stay well away from PC’s hard disc (C: drive) and confine your experiments to a floppy disc in drive A: prepare one beforehand by using Windows Explorer to copy a few documents and text files to a floppy. Boot up your PC or exit Windows to the DOS mode -- see last week’s Boot Camp – and change to drive letter A by typing A: at the C:> (or C:\WINDOWS>) prompt. For the sake of clarity we’ll be using all uppercase letters for commands and drive letters but DOS works in both upper and lowercase.

We’ll begin with DOS’s Help facility. It’s quite crude by comparison with Windows Help and even earlier versions of DOS (prior to Windows 95), but it is very easy to use. Simply type in the command after the A:> prompt, followed by the switch ‘/?’ (as usual without the inverted commas). For example, to find out how the change directory (CD) command works, and how to use it type ‘CD /?’ and press Return.

Locating files and folders in DOS (and Windows) can be made a lot easier by the use of ‘Wildcards’. A wildcard represents an unspecified character or characters, the two wildcards used in DOS are the asterisk ‘*’, which can mean literally anything, from a single character to a whole filename, the other one is the question mark ‘?’, which represents a single character only. For example, if you wanted to tell the PC to list just the document files in a particular directory you would use the command DIR *.DOC, where the asterisk represents all files with the extension .DOC. You could use the ‘?’ wildcard to limit a directory search to a group of files with a four letter filename thus: ‘DIR ????.DOC’

When moving files around on your PC it’s useful to be able to create a new directory on a hard or floppy disc drive, for that you need the MD (Make Directory) command. This is similar to ‘New’ on the File menu in Windows Explorer. If you want to create a new directory called ‘OFFICE’ just type MD, followed by a backslash and the name of the new directory, thus: ‘MD\OFFICE’. To create a new directory on another disc drive – e.g. hard drive C, insert the drive letter, followed by a colon, into the command, so from the A:> prompt you would type ‘MD C:\OFFICE’.

You can copy the entire contents of one disc to another using a DOS utility called DISKCOPY. To duplicate a floppy disc, for example, the command would read DISCOPY A: A: if you’re wondering how that works when you only have one floppy disc drive, DOS first reads the contents of the source disk into the PCs memory, prompts you to load a fresh floppy, onto which it writes the files.

It’s possible to change filenames and extensions using the RENAME command, usually shortened to just REN. To rename a file called MEETINGS.DOC to CALENDAR.DOC type the command ‘REN MEETINGS.DOC CALENDAR.DOC’ and it’s done. By now your monitor is probably looking a bit crowded so here’s a quick and simple way to get rid of the clutter, type CLS (Clear Screen), at the A: prompt to empty the screen. Whilst we’re at it here’s another quick one, type MEM and you’ll see a full breakdown of your PCs memory configuration.

DOS can display the contents of any file using the TYPE command, but this will not allow you to change its contents and in any case you won’t be able to see it all, if it fills more than a single screen. However DOS also includes a full screen text editor, called EDIT, that will allow you to change, save and print the contents of a file. Type ‘EDIT’ at the command prompt the screen turns blue, and a Windows type menu bar appears at the top. You can also open a file directly by adding the name of the file after the EDIT command, i.e. EDIT MEETINGS.DOC. Note that if you open a non-ASCII text file or a formatted document, created in a word processor like Word, the file will contain lots of gobbledegook characters and symbols. Whilst the PC is in DOS mode you will probably find that your mouse doesn’t work, this is quite normal if a DOS mouse driver hasn’t been installed. To use EDIT you’ll have to resort to the keyboard, press ALT to highlight the first menu item, use the right and left cursor arrow keys to change menus items, and the up/down arrows to select commands.

Finally some heavy-duty commands that you should treat with great caution.  You can erase entire directories with the ‘RD’ (Remove Directory) command, to erase the office directory you have created the command would be ‘RD A:\OFFICE’. Be warned, there are no undo facilities or a Recycle Bin in DOS, when it’s gone it’s gone! To remove individual files you can use the DEL (Delete) command and this is also very powerful since you can use it with wildcards to erase whole groups of files. For example, to delete all of the document files within a folder, use CD to change to the folder’s directory and type ‘DEL *.DOC /P’, the /P switch is important as it will ask you to confirm each deletion.

That’s just a quick taste of what DOS can do, if you would like to find out more the latest revision of the classic ‘DOS For Dummies’ is well worth reading and there are plenty of web sites to peruse, including: http://www.computerhope.com/msdos.htm

Next week – It’s Phone Day, again…

 

JARGON FILTER

ASCII

American Standard Code for Information Interchange. Keyboard codes representing a standard character set recognised by almost all computers

DOS MODE

The PC is ‘booted’ without Windows with DOS as the primary operating system

SWITCH

An extra instruction (or instructions) added to the end of DOS command

 

TOP TIP

A lot of people are naturally concerned that private files on their Windows 95/98 PCs could be opened or ‘hacked’ whilst they are connected to the Internet. In practice this is extremely unlikely, however, you can reassure yourself and make sure it won’t happen by ensuring that no-one has enabled the facility that allows external access to your PC’s hard drive. From the Start menu select Settings then Control Panel and double click on the Network icon. Now click on the File and Print Sharing button and make sure that the item ‘I want to be able to give others access to my files’ is unchecked.

Search PCTopTips 


Web

PCTopTips

Boot Camp Index

2010

2009

2008

2007

2006

2005

2004

2003

2002

2001

2000

1999

1998

 

Top Tips Index

Windows XP

Windows Vista

Internet & Email

Microsoft Word

Folders & Files

Desktop Mouse & Keyboard

Crash Bang Wallop!

Privacy & Security

Imaging Scanning & Printing

Power, Safety & Comfort

Tools & Utilities

Sound Advice

Display & screen

Fun & Games

Windows 95/98/SE/ME

 

 

 

 

 

 Copyright 2006-2009 PCTOPTIPS UK.

All information on this web site is provided as-is without warranty of any kind. Neither PCTOPTIPS nor its employees nor contributors are responsible for any loss, injury, or damage, direct or consequential, resulting from your choosing to use any of the information contained herein.