home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
DESQVIEW
/
QW920327.ZIP
/
EDLIN.TEC
< prev
next >
Wrap
Text File
|
1992-03-09
|
10KB
|
235 lines
ID:ED How to edit your DOS files.
A Quarterdeck Technical Note #209
by Bob Perry
Our Technical Support Team has determined that a modification of your
computer's "boot-up" files is necessary to correct a conflict your system has
been experiencing. The two "boot-up" files used by DOS are the System
Configuration File, CONFIG.SYS, and the System Startup Batch File,
AUTOEXEC.BAT. After the following preliminary questions have been answered,
you should be able to modify these two files following the prescription of our
technician.
Q: What are the CONFIG.SYS and AUTOEXEC.BAT files?
Both the CONFIG.SYS and AUTOEXEC.BAT files are ASCII text files that DOS
processes when your system is turned on or restarted. They are found in the
root directory of your boot drive. (For most DOS machines with a hard disk,
C:\ is the drive designation of the boot drive). CONFIG.SYS allows you to
configure certain aspects of DOS, such as installing device drivers for memory
management. AUTOEXEC.BAT is an optional batch file (although almost everyone
uses it) containing a series of DOS commands, which may include the
installation of TSR (Terminate and Stay Resident) utilities, or configuration
and enhancement features.
Q: What programs are used to modify the CONFIG.SYS or AUTOEXEC.BAT?
There are three ways to modify a text file like your CONFIG.SYS and
AUTOEXEC.BAT files.
1-Use your word processor.
2-Use simple DOS commands.
3-Use the EDLIN program in DOS.
Although it is probably much easier to use your own favorite word
processor, like WordPerfect or DESQview Notepad, to edit your system
configuration files, simple DOS commands like COPY, TYPE, and REN can be used.
Also, DOS contains a "line editor" known as EDLIN which can be used to create
and edit more elaborate text files. EDLIN is a bit more cumbersome to use
than most word processing programs. Hence, it may be faster to learn how your
own word processor edits a DOS text file (also known as an ASCII file, or
Nondocument mode) than to use EDLIN.
Q: How can simple DOS commands help modify my files?
Another way to edit your CONFIG.SYS or AUTOEXEC.BAT file is to use simple
DOS commands. In this example we will assume it is necessary to make a change
to your CONFIG.SYS file. First, you should determine the location of the file.
It is usually found in the root directory of your hard disk. To be certain it
is present in the root, change directories to the root and type:
C:\>DIR CONFIG.SYS (and hit Enter)
You should see a message displayed indicating the size, the date, and the time
your CONFIG.SYS file was created. like this:
C:\>DIR CONFIG.SYS
Volume in drive C is (your label)
Directory of C:\
CONFIG SYS 114 12-03-90 11:18a 1 File(s)
5746688 bytes free
C:\>
Next, just to be on the safe side, you should make a backup copy of your
CONFIG.SYS file. This is so that if you need to recall any of it's contents it
will still be available to you. To do this, use the DOS REName command:
C:\>REN CONFIG.SYS CONFIG.OLD.
This will rename your CONFIG.SYS file to CONFIG.OLD. To view the contents of
your old file, enter:
C:\>TYPE CONFIG.OLD
All the lines in the file will be displayed on the screen.
To create a new CONFIG.SYS file with the changes prescribed by our Technical
Support specialist, use the DOS COPY CON command, as in this example:
C:\>COPY CON CONFIG.SYS
The cursor will move to the next line indicating that it is ready for you to
create the first line of text in the new CONFIG.SYS file. Following the
advice of the support specialist, various items can be created on this and
successive lines. Accurately type the information for each line and hit
Enter. When all the proper lines have been typed, hit Enter once more to move
the cursor to the line below your new file. Note that the backspace key can be
used to correct a typing mistake, but you cannot go back to a line once you've
pressed Enter. At his point type ^Z, or your function-6 key (F6) and then
Enter. You should see:
^Z
"1 File(s) copied"
This confirms your file has been saved to disk. You should use the DOS TYPE
command to be sure:
C:\>TYPE CONFIG.SYS
Q.How is EDLIN used?
Another way to edit your files is to use EDLIN. The EDLIN program is used
from the command line, or DOS prompt. The proper syntax is: EDLIN
[drive:][path]filename. Note that the drive and path are optional. The
filename parameter specifies which text file you want to edit, if the file
does not already exist EDLIN will create it. You reference text by its line
number, which EDLIN displays for convenience. Each line can be a maximum of
253 characters, and you may have from 1 to 65,534 lines in a file. Once the
file is created or loaded, EDLIN displays its asterisk prompt (*) and you can
begin to enter commands.
EDLIN commands are single characters which may be either upper or lower
case, and are preceded by one or more line numbers. The EDLIN commands you
will use to modify your CONFIG.SYS or AUTOEXEC.BAT files are:
COMMAND: MEANING:
-------- --------
linenumber selects a line of text for editing
D deletes one or more lines
E end; saves the file to disk and exits EDLIN
I inserts new lines
L lists or displays one or more lines
Q quit; ends session without saving file
F3 copies all characters of the old line to the
new line
For example, if you must edit your CONFIG.SYS file you should first make
a backup using the DOS REN command:
C:\>REN CONFIG.SYS CONFIG.OLD
Now you can begin to use EDLIN to create a new CONFIG.SYS:
C:\>EDLIN CONFIG.SYS
Edlin will then display: C:\>EDLIN CONFIG.SYS
End of input file
*
At EDLIN's asterisk prompt, you should list the contents of your CONFIG.SYS
file so that the line numbers (followed by colons, ":") are displayed. Use
the "L" command, as follows:
C:\>EDLIN CONFIG.SYS
End of input file
*L
1: DEVICE=C:\QEMM\QEMM386.SYS RAM
2: device=c:\qemm\loadhi.sys c:\mouse\ktmouse.sys /1
3: files=20
4: buffers=1
5: stacks=0,0
*
To edit a line you must type the linenumber and hit Enter at the asterisk
prompt. Let's say your technician has recommended that you add the exclusion
parameter, X=F000-F7FF, to your QEMM line. You only need to type "1" and
press Enter to edit line 1. Simply type in the new line at the asterisk below
the original text. When a simple parameter has been recommended by your
technician's prescription, EDLIN's F3 key is a very convenient way to display
the entire contents of the original line. F3 is also a good way to prevent
typographical errors. Then, all you need to do is backspace to the correct
spot and type in your recommended parameter:
C:\>EDLIN CONFIG.SYS
End of input file
*L
1:*DEVICE=C:\QEMM\QEMM386.SYS RAM
2: device=c:\qemm\loadhi.sys c:\mouse\ktmouse.sys /1
3: files=20
4: buffers=1
5: stacks=0,0
*1
1:*DEVICE=C:\QEMM\QEMM386.SYS RAM
1: (pressing F3 at this point displays the entire line
above for your convenience)
1:*DEVICE=C:\QEMM\QEMM.SYS X=F000-F7FF RAM
*
Finally you must type "E" to save your new file to disk and exit EDLIN. Here
is how this looks on the screen:
C:\>EDLIN CONFIG.SYS
End of input file
*L
1:*DEVICE=C:\QEMM\QEMM386.SYS RAM
2: device=c:\qemm\loadhi.sys c:\mouse\ktmouse.sys /1
3: files=20
4: buffers=1
5: stacks=0,0
*1
1:*DEVICE=C:\QEMM\QEMM386.SYS RAM
1:*DEVICE=C:\QEMM\QEMM.SYS X=F000-F7FF RAM
*E
C:\>
Use the DOS TYPE command to view the changes you have made:
C:\>TYPE CONFIG.SYS
Q.What have we accomplished?
Three different methods for editing your system's "boot-up" files have
been described. You should take your choice of the method that makes it
easiest for you to follow the advice given by our technician. For more
detailed information on the subject of editing DOS text files, consult:
a) the company that sold you your copy of DOS
b) your Word Processor's documentation regarding ASCII
or DOS text files
c) your DOS User Manual's section on the EDLIN utility,
(which is often Chapter 8 or 10)
d) The MS DOS Encyclopedia, by Microsoft Press, page 829
e) DOS Power Tools, by PC Magazine, page 233
f) The New DOS 4.0, by Christopher, Feigenbaum, Saliga,
John Wiley & Sons, page 75
g) MS-DOS Bible, the Waite Group, H.W. Sams & Co, page 95.
h) DOS The Complete Reference, K. Jamsa, Osborne/McGraw-
Hill, pages 403-452.
When you edit your CONFIG.SYS or AUTOEXEC.BAT files don't forget that you
must reboot your computer to have the changes you made take effect. While it
is not the responsibility of Quarterdeck to serve as your DOS tutor,
consultant, or to support DOS's commands (since DOS is not a Quarterdeck
product), this technical bulletin is provided with the best interest of
trying to get you started with useful DOS features. Since you have now
learned about your CONFIG.SYS and AUTOEXEC.BAT files and how they are
modified, we are sure you are on your way to becoming more proficient in the
use of your computer.
************************************************************************
*This technical note may be copied and distributed freely as long as it*
*is distributed in its entirety and it is not distributed for profit. *
* Copyright (C) 1991 by Quarterdeck Office Systems *
************************ E N D O F F I L E *************************