|
DOS (continued...)
FILES...
There are several different kinds
of files. There are files which the OS needs to run properly,
there are program files needed to run applications, and data
files which you create with different application programs.
Every file must have a name and certain rules
must be followed when naming files:
- Filenames can contain from 1 to 8 characters
with an optional extension consisting of a period (dot)
followed by 1 to 3 characters. eg. february.txt
- Each file must have a unique name. You can
have files with the same name and different extension, or
files with different names and the same extension, but DOS
will not allow you to name 2 files the same in the same directory.
- A filename can consist of any alphabetical
letters or numbers and can contain the characters _A$-!-{}()@.
No other characters are acceptable.
- DOS has certain reserved words that
cannot be used as file names.
eg. CON, PRN, NUL, AUX, LPT, etc...
You don't want a file to have the same name as a
DOS command or program. This could only lead to
problems down the road.
- Filenames cannot have a space in them.
Remember: DOS does not distinguish between
upper and lowercase, therefore letter.txt is the same as LETTER.TXT.
Sometimes, the type of file can be distinguished
by the extension:
eg. . LET .SYS
.EXE .DBS
.DOC .DRV
.BAT .REC
.WRI .TXT
.WP .COM
Some program files execute just by typing the
name of the file and pressing 'ENTER'. You don't have to type
the extension.
eg. FROGGER.EXE or DO_IT.BAT
The file with an '.exe' extension is known
as an executable file. This could be an application program
of some sort and could be started simply by typing 'frogger'.
The file with the '.bat' extension is known
as a batch file. This is a user written file that will automatically
execute a series of DOS commands. It's like a 'mini program'
that will run simply by typing 'do_it' at the dos prompt, then
pressing enter.
continued...
|