|-The Ultimate Guide To MS-DOS-|

Author- Ennis
Contact- nho@hackermail.com


OK, first of all Windows, I hear screams of lame security and I agree. However every newbie I have every known runs Windows and with the new Script Kiddie culture it is now easier to use Windows as an assault computer and the need for Linux/other OS has declined.
So I have decided to begin with Windows and DOS.
The main reason for this text is that DOS is vital to computer history. The term DOS [ disc operating system ] has become synonomous with operating systems.

This tutorial will show you how to do basic groundwork using MS-DOS which most of you will have especially if your running Windows.
I will begin with DOS as without it Windows is nothing so if you aint interested in DOS then skip to the Windows section.

MSDOS is probably the most widely used operating system in the world today. It is produced by a company we all know Microsoft and was first called
QDOS [ Quick and Dirty Operating System ] but has developed considerably since then.
The original DOS system was made by Tim Patterson and was only 4000 lines of assembly code.

* MSDOS Commands
Since MSDOS was developed later than CP/M it has a wider range of commands available to the user. With nearly 30 built in commands and several additional programs available MSDOS is a powerful operating system.
Here is a list of the main MSDOS commands.

BREAK- allows break key interuption during programs
CLS- clears the video display
COPY- copies files
CTTY- defines the device to be used for input
DATE- sets and displays the date
DEL- deletes named files
DIR- displays list of files on disc
ERASE- erases all files on disc
MKDIR- makes a sub-directory
PATH- sets up search path through sub-directories
PAUSE- stops operation for user response
PROMPT- selects the character to be used as the system prompt
REM- identifies a remark line which the system displays on the screen not executed
REN- renames files
RMDIR- deletes sub-directory
TIME- sets and displays current time
TYPE- lists contents of file to the display
VER- gives the version number of the operating system
VERIFY- sets the discs to read after write to verify data

>>>External command files normally supplied with MSDOS include-

CHKDSK- checks the file structure of discs
DISKCOPY- copies discs
EDLIN- simple line editor
FORMAT- formats blank discs
MORE- pages output into single screens
RECOVER- salvages programs from currupt discs
SORT- used to sort data

Although it is unlikely that this section will be used by a lot of people i have included it in case anyone ever needs to load MSDOS whatever the reason or problem may be.

OK, here we go MSDOS is supplied on a single floppy disc, these days it should come with Windows. Search around for the disc then stick it in to your computer.
After the MSDOS disc has been inserted you will get a reply on your computer screen, ending with the system prompt
This shows you that MSDOS has loaded, and is waiting instruction.
NEXT we have to check the directory..

Now that we have the system prompt we can check what programs are present on the disc.
To do this we use the DIR command, by entering this we will get a list of all files in drive A. {a>_}
A whole load of information will pass the screen eventually stopping at the number of files and how much space is available on the disc.
If there are loads of files on the disc, then the DIR command will try display all of these on a single screen.
To modify this we can add a /W suffix.
which tells DOS to display the directory in wide format.
However this omits the file size and date of last amendment.
So another option is to add the suffix /P
This shows 23 lines of the directory to be displayed, and a keystroke moves onto the next 23 lines.

The copy command is in-built into DOS. With copy you can move files from disc to another.
When copying files the new file can have a new name if required.
The command
COPY File1.txt File1.bak
will make an exact copy of file1.txt.

When copying files it is possible to give the new copy file a different name than the origanal just as in Windows.
DOS also allows you to rename files without copying them.
REN is used for this command.
REN File1.txt Fileone.txt
Also the command
will rename all .txt files as .doc files on a disc.

To delete unwanted files use the DOS command DEL.
As with COPY and REN you can remove all files in one go with the command
but you will recieve the prompt
Be careful with this command DOS is not designed to recover accidently deleted files.

Files such as .txt files can be specified in the directory in DOS using the command
this will show all files such as .txt or .doc
Also remember DOS directories are not in alphabetical order.

MSDOS assumes that any file you create with .BAT is a batch file and will execute any commands in the file sequentially.
By creating a .BAT file you can perform complex and repetitive tasks easily.
One of the uses for a batch file is to configure the computer when it is on. For this purpose DOS looks for the AUTOEXEC.BAT file which stands for
AUTOmatically EXECute .BATch

The type of file on a disc is indicated by the suffix that follows also known as its extension.
Here is a list of extensions.
.ASM - 8086 assembly language source code
.BAK - backup file
.BAS - basic source code
.BAT - batch command file
.COM - executable command file
.EXE - relocatable executable file [most commen]
.LIB - library file
.MAP - list file from linker
.$$$ - temporary system generated file

There are many more but too many to name.
%%%hint: viruses usually contain odd extensions such as .VBS etc. but fool user by appearing in an e-mail like so
this can easily fool relaxed users.

Normally MSDOS prompts the user with the current drive letter
However the system prompt can be altered by software to produce a customized prompt.
This is done by entering PROMPT followed by text or special characters.
HERE is a list of some of them
$$ the '$' character
$t the current time
$d the current date
$p the current directory of the hard drive
$v the version number
$n the default drive
$g the '>' character
$i the '<' character
$b a blank space
$s a space [leading only]
$h a backspace

Each time you enter a command in DOS it is stored in a special place in the memory known as a template.
So to save time with writing in commands they can be altered to 1 or 2 keystrokes.
However these vary from machine to machine so youll have to see what applies to your pc.
HERE is an example of Command Editing..
if you wanted to TYPE a .txt file and mispell TYPE as BYTE then the following commands will correct the line.
BYTE File1.txt

which results in
TYPE File1.txt