|
Doctor
DOS
Betamax's
|
DOS TIPS
Sixty-Plus Helpful Hints to Allow You and
Your System to Operate Quickly and Efficiently
|
|
The following suggestions are chiefly aimed at
having DOS and your computer run much faster with
less hassle and fewer problems. Some tips are more general
though, and so may be applied to non-DOS computer platforms.
This article presumes that the reader has basic knowledge of DOS, and
of its path and directory structure. Some tips apply to DR, MS or
PC DOS Versions 5 through 8 or newer, and/or to the very powerful 4DOS
up to and including Version 8. However, most will function well with
little or no modification for most manufacturers and versions of DOS.
|
Preliminary
I use a disc cache with very aggressive settings, plus a high-end
memory manager for my lower, upper, high, expanded, and extended
memory areas. I also run a large RAM drive. All this is coupled
with a combination of batch files, keyboard macros and aliases,
plus program/utility scripts and macros to gain maximum speed of
operations with fewer keystrokes and minimum tedium. These are
briefly explained below along with other helpful hints that will
allow one to work towards becoming a DOS Power User.
For computers running at 800 MHz or faster some of these suggestions
may result in little difference unless the processor is overworked.
However, on slower systems, or when doing any long complicated chores,
each little tweak will add up to noticeable time saved. Implementing
the recommendations on this webpage will make your DOS system run
amazingly fast on a slow processor. Even with faster ones, doing
the following will keep things running efficiently, if for no other
reason than to reduce most tasks to just a few keystrokes, thus
speeding you up.
Many of the DOS programs mentioned here are still available because
they have been placed onto the Internet. See
DOS Websites for these and many, many others.
A high number of DOS programs are share- or free- ware, so the cost is
minimal to try some wonderful software.
|
NOTHING IN THIS INSTRUCTIONAL MAY BE REPRODUCED
WITHOUT PERMISSION FROM THE AUTHOR ©
Let Us Begin the Tips...
- 1/ Partition Hard Drives to Gain
Maximum Usage.
For older DOS versions, hard drive size is limited. Before version
3.3, partition size had to be 32 MB or less. From 5.0, it was 2 GB. One
way around that was to use after-market drive management programs to allow
for larger drives, but that sometimes resulted in compatibility issues.
A better method is to divide the drive into smaller partitions. PC-DOS
3.3 allowed one to have multiple 32-MB partitions and Microsoft's version
4 allowed the same. Since MS version 5.0, one can have 2 GB ones, while
other DOSes support FAT 32 to allow terabyte sizes. However, to remain
compatible with a wider range of DOS programs over the years, FAT 16 is
recommended unless one needs to store multiple, large media files, then
one of the partitions could be FAT 32. Simply make multiple 2 GB areas for
different purposes. I have a main `C' drive for most programs, a `D' drive
for games, while `E' is my media partition. Be aware too, that staying
with FAT-16 partitions allows one to employ some very useful, older disc
utilities. (Never run FAT-16 utilities on FAT-32 partitions!)
Partitioning has an advantage when keeping all user data separate.
Doing so can guard that data in the event of disc damage elsewhere, and
can also give protection from those viruses which don't jump partitions.
Further to the latter, if one keeps no programs and only data on one
partition, the likelihood of data corruption can be reduced. In addition,
data on one partition allows for easier backups. A partitioned drive also
means faster seek time because the drive heads move within a smaller area
when locating the start of a given data area.
- 2/ Use LABEL to Prevent Accidental
Hard Drive Formatting.
Label each hard drive and any partitions. If a format is
accidentally issued for any fixed (hard) disc, DOS will ask you to type
the label name before a format begins.
For an extra measure of security, use an ASCII (ASS-key) space as part
of the label name. LABEL allows spaces anyway, but using an ASCII space
typically requires that one press & hold the ALT key while typing "255"
on the number pad, and then releasing the "ALT" key. In order to reformat a
hard drive or one of its partitions, the same sequence must be issued when
typing the label name. This technique will stop viruses from formatting a
drive unless the virus has been programmed to recognise ASCII spaces. It
will also be a hinderance to hackers who may not think that an ASCII space
has been employed -- if they even know what it is.
- 3/ Keep the Path Short and APPENDed
Directories to a Minimum.
When a command is issued, DOS first looks at DOSKEY or Toddy
Macros, and then at 4DOS Aliases or their equivalents as available from
other similar programs. Next it looks for an internal command of the name
typed at the command line. If it doesn't find a match, it searches through
the current directory. If a command (.com), executable (.exe), or batch
(.bat or.btm) match is not found there, and if there are no appended
directories, DOS refers to the path statement to see in which other
directories it may look. In each of those directories it again searches
for a matching command, executable, or batch file. The more directories
in the path, the longer it takes DOS to find the file required to execute
your request.
As for appended directories, using APPEND to allow programs to look for
files in additional, designated directories can add further to the problem
if the appended directories are set during boot-up. If this is the case,
these directories will be searched any time DOS needs to go beyond the
current directory. (To reduce this extra searching, APPEND can be turned
on & off at will in newer versions.)
Be aware that major programs may have up to several hundred files in
their directories. If those big programs are in the path, DOS may have to
look through several large directories full of scores of files to find what
you requested. Having those large program directories in the path adds time
to that search. If APPEND is required, it is best to issue this command
before a program needing it is run, then to turn off APPEND when the program
is closed. (See Below.)
You may shorten your path through the use of
batch files to start programs. A batch file
directs DOS to the exact directory and executable required to start a given
program. Included in this batch file can be commands to alert a program as
to where to find its associated files. This reduces the search to just one
directory and allows DOS to go immediately to work. I use this technique
for all program execution, so I have reduced to only two directories in my
path: BATCH and DOS. (Basic batch files are in plain English and are easy
to write: See Batch Basics.)
Once a batch file is set up to start a program, then you should specify
to that program where to look to find the files required to run itself.
This is done within the given program, within the batch file, or through
the DOS environment via the "SET" command, or by using the DOS "APPEND"
command. (See #34, farther on, for "SET" tips.) These programs' directories
may then be removed from the path statement. There is a speed advantage to
this as well, in that the program itself no longer has to look through the
path to locate its own files because you have directly told it where to
locate those files.
- 4/ Place Often-Used Directories near
the Start of the Path.
Since most commands are going to be DOS ones, place your DOS
directory first in the path statement. DOS will find its own commands
faster this way since it does not have to search through unnecessary
directories. This does not apply to 4DOS Aliases, DOSKEY or Toddy macros,
or to internal DOS commands; these are always in memory when DOS is running.
They are looked through first regardless of which directory is current.
However, the speed at which any non-internal commands used by these macros
or aliases are accessed is affected by their location in the path (unless
one issues complete paths with each command -- see next).
For my systems, since I use batch files to run everything, my BATCH
directory is actually first in my PATH statement. Within those batch files,
I state the direct path to all commands and program executables anyway.
(See next.)
- 5/ Issue Full Path & File Names for
all External Commands.
Whenever you issue a command, if a full path name is specified,
DOS goes straight to the directory containing the command and immediately
issues that command. Thus, DOS does not need to look through the path
statement's directories at all. This skips a step and possibly a lengthy
search if you have a long path.
If the directory happens to contain the command in .com, .exe and
.bat/.btm forms, always specify the appropriate extension. This method
garners a bonus in the form of protection against "companion" viruses. A
companion virus will write a .com file to echo an existing .exe file, but
with the virus attached. Since a .com file has priority, it will run first,
thus spreading the virus. By using full path names, including the
file name extension, one may slow or prevent to some extent, the spread
of this type of virus.
Shortcut Usage
Since it's tedious to type full path names, place
your commonly used commands with their full paths
into aliases, batch files or macros. This way you will
only need enter a few keystrokes to have DOS go
directly to work.
For really frequent usage, assign the batch
file or macro to a key. (See #47 farther on.)
|
- 6/ Keep Files Sorted by Using
Subdirectories.
The novice user of most any computer system typically fails to
keep his or her hard drive sorted and organized. This leads to confusion,
slow operating, and sometimes creates conflicts that make the computer
behave in unexpected ways. Then there is the frustration of having to look
through crowded directories for wanted files and then having to perform
operations on a select number. File-management tasks are much easier when
there are fewer files. As well, file undeletion is more likely to be
possible when fewer files reside in a directory.
In a DOS system, if one allows the root directory to hold a lot
of files, the limit can quickly be reached. Most DOS systems only allow
512 sub directories and files to occupy the root directory of a given drive.
Files and directories should be categorised into subdirectories to avoid
exceeding that limit. The only files in the root of the drive with the
active partition should be the command interpreter (typically COMMAND.com)
and configuration files such as CONFIG.sys and AUTOEXEC.bat, plus the
system files such as IBMBIO.com and IBMDOS.com or their equivalents.
Note that it is possible to place some of these elsewhere, but usually
they reside in the root directory. Realise that some programs will place
certain files in the root and that is OK, but if you have a choice, put
them into an appropriate subdirectory.
By the same logic, make sub-subdirectories as necessary. Should one wish
to move or delete a program and its files, if they are grouped in with other
things wishing to be kept, a lot of time will be wasted sorting out what is
not to be deleted. (Remember: DOS programs do not require a de-installer.)
Always create directories for every subject and sub-subject.)
For example, if you have a word processor, all the files that software
uses should be in some sort of "WP" directory. Then, as you create data
files, make subdirectories for that data with one directory for each
category. So you might have one for each family member, and each
member might have his own categories under that such as "CAR", "MUSIC",
"WORK", and so on. This method is the equivalent of having a file cabinet
in which each subject is kept in a separate file folder, or having a
separate drawer for each type of tool in a workshop.
You can even take this idea to DOS itself. I have created twenty-two
subdirectories in my DOS directory. As an example, I placed all of DOS'
device and system drivers into a subdirectory called "DEVICES". When they
are loaded via Config.sys or Autoexec.bat, I show full path names so DOS
can find them. Then during normal operation, DOS does not have to look
through those extra 20 or so files when perusing the DOS directory.
Continuing with this technique, I managed to cut down the files in the
main DOS directory from over 150 to just over 30 by putting little or unused
DOS files in other directories. This has lessened the search time during
the day to day running of DOS. (I also keep a few utilities in here so that
they are in the path. Still, the total is only 37.)
Many programs will allow you to categorise their files to some extent,
but check to see that they are capable of specifying to themselves where
to find those relocated files. As mentioned in #3, farther back, this
requires the program having either internal capability or being able to
make use of DOS's "SET" or "APPEND" commands. (See #34, farther on for
"SET" suggestions.)
- 7/ Keep File Names Short.
Even if you use long file names in DOS, keep the names no longer
than necessary. Long names take up more room and take longer to type, making
for more work at the command line. They also mean fewer file names can be
displayed at the same time in a wide DIR listing.
If using a directory utility and/or auto-completion, longer file and
directory names mean the number of choices will increase. This makes for
additional steps and extra time taken to peruse the matching file names
in the list so as to locate the actual file name or names you want.
With longer files names, users tend to be less creative when coming up
with different first-letter strings in order not to have those first few
letters duplicated in multiple file/directory names. The likelihood of having
duplicate character strings at the start of the name means they will match
too many other names. As just mentioned, this creates additional steps and
takes extra perusal time. Thus, the acquisition of directories and files,
and their maintenance, is slowed.
At the very least, if you use longer file names try to make the first
eight letters not match any other file names. To aid in that endeavour, group
like files within subdirectories so that subdirectory name is no longer part
of the file name. Thus, "IMG_001_2022-12-25.jpg" could be in a directory
under IMAGES called "XMAS2022", and the ones taken on the 25th could be in
a subdirectory below that called "12-25". This not only makes it easier when
searching for a particular file, it greatly aids in hard drive organisation.
- 8/ Remove Unnecessary Backup and
Temporary Files.
Computer operation is slowed down when DOS has to look through
unnecessary file names. In most cases, programs delete .bak and .tmp files
after using them, but some programs are sloppy. As well, if an error
occurred or the computer lost power/was shut off before a program had
finished and was exited, these files may remain to clutter your hard
drive.
To see which, if any, of these are on your computer, issue
DIR \*.tmp /P /S. This will list all such files on the current
drive, pausing after each screen fills, and include files in subdirectories.
If you are not currently running any programs, you may delete the .tmp
files. Do the same for *.bak files. You may delete these except for
autoexec.bak and config.bak files, or any others you know you've created
for your own backup purposes. If you are unsure of certain ones, move them
to a flash drive, external hard drive, or floppy disc for safe keeping. If
problems arise, you can always restore from the removable media. (Be sure
to keep track of in which directory each file was originally.) There are
programs available that will clean your drives of these files
automatically, if you wish.
- 9/ Remove Duplicate Files.
Files have a way of multiplying on your hard drive. Not only
are they usually a waste of space, but they increase the number of files
through which to look if they reside in directories included in a given
search. This can slow operations if there are a high number of these
files -- especially if one must determine if the file is truly a
duplicate or not.
The solution is to identify and delete these files wherever possible. I
say "wherever possible" because some duplicates may be used in different
directories by different programs for similar purposes. Eliminating one of
those would likely cause a program error. As well, it is wise to have some
files duplicated in different directories as back-ups. COMMAND.com is such
an example.
To reduce the tedium of finding these duplicates, use a program designed
for the purpose. I use PC Tool's FileFind. One of its features is to
be able to locate duplicate files within, or across, any number of drives.
It allows one to include or exclude certain file types, and searches can
be narrowed or expanded as needed.
"FileFind" will display the file names, sizes, and dates/times. You
may then compare them and mark some or all for deletion, or not. You may
also view the files before making a decision. After tagging the unwanted
files, one "Delete" command eliminates all those chosen.
- 10/ Consolidate or Archive Files to
Save Space.
Files are saved on a hard drive in memory allocation units. When a
file occupies a given unit, no other file can be kept there. If that file
does not take up all the available room in that unit, there is wasted
space. This "slack space" can add up if many small files are kept on a
drive. However, one large file takes up less room than several small
ones. This is because the large file first fills as many units as
are required to preserve that file on the drive. Then leaves only
the last unit with slack space if the remaining part of the file
fails to completely fill that final allocation unit.
The space-saving solution is to combine files together either by
physically doing so or by keeping them in compressed archives. The first
method means locating like files such as READ-ME files and using a word
processor or text editor to place them into one big file, then deleting
the small ones. Another method for text files of the same subject or with
the same program is to combine them using the DOS "COPY" command. So all
of a program's documentation files could be grouped into one big file and
then the individual files could be deleted.
COPY file1 + file2 + file3... big-file.txt
or
COPY *.txt + *.doc ALL-DOCS.txt
If however you need to combine non-text files, or must maintain the
separateness of each file, a compressed archive is the answer. For an
example of one, see EDZIP.bat in
Advanced Batch File Examples II.
Finally, to gain the maximum space, copy or zip files to an external
hard drive, a flash drive, floppy or zip discs, or burn them to CDs or
DVDs. Be aware that data on flash drives may have a shorter shelf life
than that on properly-stored discs.
Implementing Numbers Three through Ten, above,
means that you and the operating system and its
programs will do less looking and more doing.
This speeds operations.
- 11/ Use Wild Cards and Symbols to
Lessen Typing.
DOS has some built-in shortcuts that may be used instead of typing
things out long hand. The Question Mark ( ? ) represents any single
character in a filename. So if one wanted to rename the "PROJECT" files
in the current directory, instead of renaming each file one at a time, one
could use the Question Mark. Here is a directory of files; note that
"PROFILE.txt" will not be included in the renaming:
PROJECT1.txt
PROJECT2.txt
PROJECT3.txt
PROFILE.txt
REN PROJECT?.TXT PROJECT?.DOC
The Asterisk ( * ) represents any number of characters up to the limit
of the file-name length usable in your version of DOS. In the preceding
example, using the Asterisk reduces typing even further:
REN PROJ*.TXT PROJ*.DOC
To rename all .txt files in that directory:
REN *.TXT *.DOC
One may also use the Dot ( . ) to lessen typing. A single Dot refers to
the current directory, a Double Dot to the parent directory. The first
example below moves all backup files from the BACKUP directory to the current
one. The second moves all the backup files from the current directory to
the parent one:
MOVE C:\BACKUP\*.BAK .
MOVE *.BAK ..\
See DOS Character Study for more.
- 12/ Cut Down the amount of Typing
further by Using Batch Files.
Any time you type a complicated command or a series of commands,
you should consider making a batch file if you intend to use this command
or series again. This applies even if you don't use it regularly. For both
cases, a short batch file name is easier to remember than a long
character series. If any commands have a sequence of switches (command
modifiers) attached, they too, benefit from batch files. (See #13, next,
and also the DOS Switches discussion elsewhere
at this website.
Part two of this is to use batch files for all your routine work.
I am forever copying and moving files to & from my floppy and flash
drives. So I wrote "CTB" "MTB" and "CFB" "MFB" batch files. They
copy/move specified files from the current directory to my `B' drive or
vice versa. If no files are specified, all files are copied or moved.
Automatic directory listings after the operation confirm the copy/move.
See the Batch File Tutorial for some basics on
batch file creating, and Batch File Examples
for the batch files just mentioned.
- 13/ Use Switches to Tailor
Commands.
Most DOS commands have a series of switches that are able to modify
the command to make it do more work. They take the form of the command
followed by a forward slash and then a letter, word, or word abbreviation.
The most common one is the "DIR" command which can sort files by size,
name, extension, date, etc., among other options by using switches. In
most DOS versions made since 1990, to see what switches are available and
their syntax as related to a given command, simply type a command name,
followed by a space, a forward slash, and a question mark. For example:
DIR /?
One may take this farther by writing a number of slightly varied batch
files containing the same command, but each with selected switches. This
serves to vary that command and reduce the number of keystrokes at the same
time. Thus one "DIR" batch file might give a wide display with lots of
file information, while another might display directories only, and a third
might show files only in alphabetical order. These versions might be named
"DIRW", "DIRD", "DIRA". To make this idea yet even more powerful, assign
these batch files to function keys. (See #47 farther on.) See also the
DOS Switches discussion elsewhere at this
website.
- 14/ Use Batch Files to Move to
Frequently-Used Directories.
In keeping with Tip Numbers 5, 6 & 10, instead of typing long
directory paths for commands or to reach the subdirectories you have
created, have batch files to do it for you. I have ones that display the
files from the DOS directory, take me to my Download & Upload
directories, to my Utility and Batch File directories, and so on. In fact,
in several cases, I have it set up so that I may choose to simply display
the directory without moving, or to actually go to the given directory and
display its contents.
I also have simple, 3-letter batch files that display only a
directory's .bat, .com, .doc, .exe, .htm, .txt, .zip, or
graphics (.gif, .jpg, .pcx, etc.) files, and also one to display my
keyboard macros. These keyboard macros are set up to move me to my most-used
directories and display the contents in one keystroke, rather than typing
in a batch file name and pressing "ENTER". (See #47 farther on, for tips
regarding DOS keyboard macros.)
If you have a great many directories, having a batch file shortcut to
each one means a lot of small files. As discussed earlier, these take up
a lot of room. A good number of them would be little used and when needed,
the user may not be able to remember the batch file name. In this case, it
is more logical to use a directory utility. This allows one to type
a partial directory name and the program will take one there, or it will
present a list of possible choices. This saves typing a drive letter and
the complete path; plus it removes the clutter of a lot of small batch
files. I use Directory Maven, but there are many others from which
to choose.
- 15/ Have Batch Files Start all
Major Programs.
In keeping with the last three tips, make up batch files for
all major programs you use. Not only does this save moving to a program's
directory in order to start it, but one can incorporate into the batch
file the necessary switches and variables one might typically employ when
using that program. You might even write several scenarios for that
program and set it up so that a single letter following the batch file name
executes the desired scenario.
As discussed later in Tip #34, one could incorporate the environmental
necessities required by a program into its batch file to save typing them
or to save having them in a DOS startup file. Further, if one needs to
temporarily add a program to the path, set ASSIGN, JOIN, SETVER, SHARE,
SUBST, or other requirements in order to run a program (especially very
old ones), do these only within the batch file that starts each given
application. Then place commands to disable or remove them after the
close of the program. Using this technique means they won't be taking up
memory during other operations nor will they slow things down
unnecessarily when the given program is not running.
- 16/ Employ an Auto-Completion
Utility.
With this, one types a partial program name, or a command followed
by a partial directory or file name, and then strikes a designated key. Upon
pressing that key, the directory, file, or program name that matches the
first few letters will be completed automatically. If there are more than
one match, either a list will be presented, or the matches will be shown in
sequence until the desired one appears. This allows one to diminish typing
down to only a few characters.
The best ones can even work remotely in other directories. So if one has
a directory "C:\UPLOAD\HOLD" with a file called "READ-ME.TXT" in it, a good
auto-completion program will complete each portion for you. So to type
(show) that file on the screen without changing to that directory:
TYPE C:\U will be completed to DIR C:\UPLOAD
Adding \H will complete to DIR C:\UPLOAD\HOLD
Adding \R will complete to DIR C:\UPLOAD\HOLD\READ-ME.TXT
4DOS has this built in, but I use Toddy. Any similar utility
will work.
- 17/ Repeat Commands Quickly with a
Command-History Utility.
Again, I use Toddy, but there are others. DOSKEY
is one that is included with several versions of DOS, while 4DOS has it
built in. This type of utility allows one to call up any command line
entry used during a session and then to re-execute it, or to edit and
re-execute. This saves typing the same commands over & over. (Note
that a user-setable limit is typically allowed so as to prevent days or
even weeks worth of commands from being kept, should you not turn your
computer off or reboot on a regular basis.)
Password Protection
IF you use passwords at the command line that do not
display as asterisks and the command history utility you
use caches them, anyone that knows how to view the
history list could see those passwords. Even with asterisks,
if they are cached, an unintended person would know at least
password lengths.
To prevent this, see if your utility can:
- Not cache the entry.
- Clear the command history.
- Lock the cache.
The first method uses Control-Enter or other key combination
to prevent the command from being cached, while the second employs
Alt-F7 or similar to completely clear the cache. The third uses a
key combination to stop commands from being saved, but keeps all
previous ones up to the limit of the cache. The first is the
preferred method because it maintains the current command history
and does not make the user have to remember to unlock the history
afterwards. Just remember to use the key combination to not
cache secretive entries.
|
- 18/ Maximise Memory Usage with a
Memory Manager.
Having the maximum Lower (Conventional) Memory available, makes
DOS a very happy operating system. If you have a 386 processor, or higher,
then you may make use of Upper Memory to load much of DOS and any TSR
(Terminate and Stay Resident) programs. Managers also provide access to,
and control of, Expanded and Extended Memory. Plus, many offer Protected
Mode services so users can run the latest DOS, 32-bit, protected-mode
applications.
I use Quarterdeck's QEMM 9.0 for maximum memory management. DR-DOS
comes with MEMMAX, MS-DOS with MemMaker. These, as do other
memory managers, will juggle and then load as many programs outside of Lower
Memory as possible. You must load DOS' HIMEM.sys and EMM386.exe, plus use
DOS=HIGH,UMB (or equivalents) in CONFIG.sys to accomplish this. (Realise
that "DR-DOS" is pronounced "Dee-Arr DOS".)
Note that even pre-386 computers may also take advantage of some of this
capability through after-market software.
- 19/ Load Large Programs First.
If you use DOS's "MEMMAKER", after running it, check your DOS
directory for a file called MEMMAKER.STS. In it, you'll see the programs
loaded. Note the loading (MaxSize) size for each. Then edit your
config.sys and autoexec.bat so that the largest of these are placed first,
with the remainder in descending-size order.
The reason for this is that some of these programs
take a lot of memory to load but have a small final (running) size. If
upper memory is mostly used up by other programs that were loaded first,
trying to load a program whose loading size exceeds available remaining
memory, will automatically cause it to be loaded low. This is even if
there's enough room in upper memory for its final running size.
Having these programs load early while there is still
enough headroom available, means they will get loaded and leave room for
some smaller programs. This trick will often result in being able to load
one, two, or even three more programs high, thus conserving all important
low memory. A similar technique may be used with other memory managers
that don't juggle the order automatically.
Even without a manager program, one may still take advantage of this
method through trial & error juggling of the load order. You may find
that a program that couldn't be loaded high, now can. Or, it may be that
an exchange of a larger program for a smaller one in upper memory, will
increase the amount of lower memory available. Experiment.
- 20/ Use a Disc Cache to Speed
Access.
Whenever DOS works, it often must go to the hard drive for
information. This takes time, especially if the heads have moved away from
the area needing to be read. The less DOS reads the drive, the faster are
operations. A cache stores the latest-accessed files in memory; this allows
memory-speed access instead of slower disc reading.
Furthermore, if you enable "Write" caching, files
being written will only go to the disc when the system is idle. This allows
the command prompt to return or programs to continue, so you may work while
disc writing goes on in the background. A disadvantage to this is that data
might be lost if there is a power failure or lock-up before the writing has
completed. I have never experienced this but those of you in areas where
power is less reliable may not want to enable Write Caching. The same
suggestion is directed at those experiencing frequent lock-ups because of
conflicts or aggressive experimentation.
Most major DOS versions come with a disc cache. DR-DOS
uses PC-KWIK or NWCACHE while MS-DOS has one called
Smart Drive (SMARTDRV.exe, or SMARTDRV.sys in older versions).
There are third-party ones too; Norton's NUCACHE and PC Tools'
PC-CACHE come to mind. I use SpeedWare's excellent
HyperDisk.
It is best to lower your BUFFERS setting if using a disc cache. DOS looks
at its own buffers before the cache. If there are too many, the delay will
be longer before DOS begins to peruse the disc cache. Lower BUFFERS to 10
or less, and remove the Look-Ahead setting completely if that feature is
included in your DOS version of BUFFERS. This is the second number in the
BUFFERS setting; the one after the comma. It is also known as the
"Read-Ahead" buffer or "Secondary Cache". Lowering the BUFFERS number
also has the advantage of freeing up more memory, as each takes up
512 - 528k of memory. I have a BUFFERS setting of `4' and have experienced
no problems even with older DOS software.
- 21/ Keep Hard Drives Defragmented for
Faster Access.
When a file is erased, the space becomes available for DOS
to place a new file there. If the new file is too large, it still fills the
available space, but the remaining portion of this new file is placed
elsewhere on the disc. For very large files, there may be fragments all
over the drive. Multiply that by a large number of files, and retrieval
speed decreases. Plus, if you are not using a deleted-file directory,
the likelihood of DOS's UNDELETE program being able to recover an
accidentally deleted file decreases if the file was fragmented. Run a
defrag program once a week, or more often if you write and erase a lot of
files in a shorter period. DOS supplies DEFRAG but there are others
available. I use Norton's Speed Disk.
Defragmented File Order
Have your defrag program place the largest files
first on the hard drive. Large files tend to often be
program executables, most of which usually don't change
unless attacked by a virus.
If available, you may request that the defrag program
place .exe and .com files first; these are your main
program files. These never change size (unless you are
experimenting with programming or have a virus), and
never increase/decrease in number (unless you add/remove
software). So for the most part, they never move.
The defrag program will gloss right over these unchanging
files and only deal with the fluctuating file space on the
drive. This lessens the time the program takes to complete
its operation.
|
- 22/ Speed up the Boot Process.
To gain a faster boot, implement some or all of the suggestions
below if they are available from your computer or DOS version. Be aware
that doing some of these may cause problems under certain circumstances.
- CMOS and DOS START
- Disable Seeks of Floppy Drives and Nonexistent Hard Drives
- Disable Checking of Memory Modules
- Boot from the Fastest Drive (Boot Order)
- Disable the F5/F8 Pause
- DOS STARTUP FILES
- Disable Memory Manager Checks of Memory Modules
- Remove Unnecessary Programs; Start them only as Needed
- Remove Unnecessary Tasks and Checks. Implement them only with
their Associated Programs
- Organise CONFIG.sys and AUTOEXEC.bat in the most Efficient Order
- 23/ Check and Exercise your Boot
Media.
When was the last time you tried your boot disc? Do you even know
where it is? Are you sure it will still boot your computer? Have you added
utilities to your system that are now needed during boot-up? Every month or
so, it is wise to try to boot your system using your boot disc. This is to
ensure it still works and that it will configure your system as it is
currently. Don't wait for a crash or other problem to find out the disc has
corrupted information, has bad sectors, or is outdated.
Use SCANDISK or other utility to check for physical damage and corrupted
information. Check that all needed drivers, utilities, and files are
included. A common forgettable is to have no, or improper, CD-ROM/DVD
drivers. For a floppy, add the required new files so that the boot disc will
be compatible with your present setup, and then defragment. Lock out the
disc to guard against it being written to by you or a virus, and afterwards
try it to see if it boots your computer. For CDs, burn a new disc and then
verify the integrity of the information by doing a test boot. Flash drives
cannot be locked out, so they should be checked for boot and other viruses.
In all cases, files should be made to be read-only. A working boot
medium is a recovery tool one cannot be without.
- 24/ Use VERIFY to Check Copied or
Moved Files.
Many DOS versions have a `/V' switch that will read the file
after it is copied or moved to its destination. For such actions within
the same hard drive, this is generally unnecessary unless one suspects
a failing hard drive. (In that case, replace the drive as soon as
possible!)
However, for removable media where the information is not being kept
elsewhere, if the files are vital, it is best to have confidence that
they can be read after the operation has been done. Using the `/V' switch
causes DOS to see if the file can be read from the destination drive and
if it can, it is likely the transfer was successful. I say "likely"
because the integrity of the data is not looked at. DOS simply sees if
it can read the file without error. This does not guarantee that the file
was not corrupted during copy or transfer, but does add a measure of
safety for important data transfers.
A trap here is that VERIFY may not function properly because of a disc
cache. It may read the cache of the disc's files instead of the disc itself.
To test that one could copy to a defective floppy disc to see if VERIFY
catches errors.
- 25/ Use a Task-Swapper.
Such software loads all requested programs into memory so they
are only a keystroke away. This beats shelling out of a program to access
another, or even quitting the program because you cannot access another
due to memory constraints. Plus, you are returned to exactly where you
left off when switching back to a previous program. This generally requires
memory above 1 megabyte and if you want to load a lot of programs, you will
have to increase memory further still. I use DR-DOS' Task Manager
or Back & Forth by Progressive Solutions. (Note that "DR-DOS"
is pronounced "Dee-Arr DOS".)
SAVE! SAVE! SAVE!
Before swapping to another task always save your work.
If anything goes wrong or you lose power, your work will
have been written to disc. This is very important if you
are running several tasks at once, each of which has work
or changes that will need to be kept.
This is a good rule even when not task swapping. Save
often while working, not just after completion. I set
"ALT-S" to save work in any program that allows such
a setting to be made. Then while working, I often hit
"ALT-S". It's very, very rare that I ever lose work,
and then it's only a few sentences, or one change in
a graphics program.
|
- 26/ Set Up a RAM Drive.
A RAM Drive (or virtual disc) is an area of memory that DOS treats
as a regular disc drive. At startup, the most used files and software should
be loaded on to the RAM Drive which means they are always in memory. Then
point programs to the RAM Drive instead of your hard drive. Employing a RAM
drive is far faster than accessing a hard drive for files.
On my main system, I have an excessive amount of memory available for a
DOS machine (328 MB). It's divided as 1 MB of Lower and Upper memory, a
64 MB RAM Drive and the balance as straight Extended Memory, with
Expanded Memory emulated from the latter as necessary. I have all the
regularly-used DOS operating system files (including the COMMAND.com and
4DOS.com shells), plus all DOS batch files and keyboard macros on the RAM
drive. I also have items such as a file viewer, two text editors and
WordPerfect's Spell Checker files always there -- plus all their support
files. In addition, all programs creating swap or temporary files are
directed to place those files on to the RAM drive.
Such a method greatly speeds operations. This type of performance
enhancement is especially noticeable with slower processors and hard drives,
but is blindingly fast on newer equipment. DOS typically comes with
RAMDRIVE.sys or VDISK.sys, but I use Franck Uberto's XMSDisk. It
allows a greater number of options and a greater range within each
option.
If you decide to use a RAM drive, you must change your path statement to
point to the RAM-Drive directories first. Otherwise, instead of proceeding
directly to the RAM drive directories, DOS will do a hard disc hunt. Being
an unnecessary search, it slows operations. None of my DOS setups have hard
drive directories in the PATH statement. It only references RAM drive
directories. All operations are handled through each system's RAM
drive.
Before turning off or rebooting your computer, don't forget to copy to
the hard drive any RAM Drive data or configuration files you have modified
or created and that must be saved. They will be lost if they are not
preserved elsewhere. (I eliminate this step by always having programs write
directly to a hard drive.) Note that program files need not be copied before
shutting down because they are already on your hard drive and were simply
copied to the RAM drive upon startup, as they will be at the next startup.
I have a batch file, LOAD-RAM.bat, that is called by AUTOEXEC.bat. It
handles the task of placing the appropriate files on to the RAM drive upon
bootup. The advantage of this is that during testing I can disable the
calling of LOAD-RAM.bat and speed diagnostic operations. Otherwise, I would
have to disable each RAM-drive load request individually if each was in
AUTOEXEC.bat.
Temp Directory
Point your "temp" and "tmp" variables to the RAM
Drive. DOS and its programs make & erase files as they
operate and they use a "temp" directory to do so, unless
one has not been set up. In that case, the program's
executable directory is typically used, slowing things
more due to the number of files through which the program
must look.
Either way, it takes longer to write these files to the
hard drive than to memory, so set your "Temp" variables
to point to the RAM Drive. In the AUTOEXEC.bat:
MD F:\TEMP
SET TEMP=F:\TEMP
SET TMP=F:\TEMP
A nice advantage of this is that when the computer
is turned off or rebooted, any temporary files remaining
are deleted automatically. This is because the RAM drive
only exists in memory until power is removed or it is
re-initialised by a reboot.
Here's an Extra-Extra Tip:
Place DOS' COMMAND.com or your choice of command interpreter on
to the RAM drive. It will run much faster from there. During startup,
after the RAM drive has been created, have your AUTOEXEC.bat copy
the file from the DOS directory to the RAM drive and then have it
issue the Command Specification:
CONSPEC=F:\COMMAND.COM
Some users do this via the SHELL command in CONFIG.sys, but
that might cause an error message (or possible lockup with older
DOS versions). This happens if the SHELL statement is issued
before the RAM drive has been created and/or before COMMAND.com
has been copied to it. To avoid any problems, I prefer to have
the directories in the SHELL statement be the same (usually
C:\DOS), and to then set COMSPEC after my RAM drive command
interpreter has been copied.
Should it be different, substitute your
RAM drive's letter for the `F' as shown
in the examples here. To have the changes
take affect, run your AUTOEXEC.bat file, or
reboot if you have modified the CONFIG.sys file.
|
- 27/ Place Batch Files into
Memory.
Have your AUTOEXEC.bat create a batch directory on your RAM drive and
then copy your batch files to it. Place the RAM drive batch directory at
the start of your path statement. These will execute much faster than if
they had to be read from the hard drive every time.
4DOS users have part of this capability built in if they use .btm files.
4DOS reads the .btm batch file from the disc only once and then keeps it in
memory until completed.
- 28/ Use "ATTRIB" to Protect
Files.
For files that you do not want to be modified or erased, change
their attributes to "Read-Only" via the ATTRIB command. This is especially
good for forms such as a letter or fax template in your word processor,
a base template in a spreadsheet program, an html webpage template, or for
a DOS batch-file starter file, since these often start and end the same
way. Simply change to the directory within the program that holds the
file(s) you wish to be protected, and enter:
Attrib +r filename.ext
You may use wild cards ( * ? ) to make blocks of files read-only. This
could be employed to make all .com, .exe, and .bat files read-only. Doing
so protects against viruses that overwrite such files with their own
versions. However, this only works with viruses not smart enough to remove
the read-only attribute. Regardless, it's a preventive measure to do this
in your DOS directory to exclude accidental erasure. (See Tip #11 for wild
card discussion.)
Protecting Configuration Files
Be sure to use ATTRIB to make your configuration files Read-Only.
Programs that modify the AUTOEXEC.bat and CONFIG.sys files will
not usually try to remove that attribute in order to make changes.
This trick provides a measure of protection, allowing one to decide
if and when such changes can be made.
As well, this method provides some protection against attempts by
users, other than yourself, to modify your configuration files. Only
knowledgeable users will figure out that the Read-Only attribute is
blocking them. In any case though, it is best to have backup copies
of configuration files in addition to protective measures.
|
- 29/ Back Up Your Configuration
Files.
When using a program, one typically alters the look, operation, or
setup to suit one's tastes. Those changes are held in some sort of
configuration file. If they should become lost, corrupted, or otherwise
changed in ways that you do not desire, you would have to reset all the
changed parameters.
However, if you have copies of these files, all that is required to
restore, or return to, your previous settings, is to copy the appropriate
file from the backup to the program directory. Typical DOS configuration
files have extensions like: .cfg, .set, .ini, .pif, etc. These examples
stand for "Configuration", "Settings" (or "Setup"), "Initialization", and
"Program Information File". There are others -- see
DOS File Extensions, elsewhere at this website.
An easy way to make copies is to add these files to your regular backup
routine by including them in the batch files you should be using to do the
backups. You may also decide to write an exclusive "Configuration Backup"
batch file that would go to each program directory in turn and copy the
appropriate files all to one disc. Then it's an easy matter to return to,
or restore, any program's settings. You may wish to arrange for all
configuration files to be placed into one .zip file with the file name
being the date the file was created. If a series of these files are
archived, one may then return to any configuration date wished. A batch
file can do this automatically including placing the date as the file
name. See Batch File Basics for a tutorial on
writing simple batch files.
Don't forget your CMOS configuration either. Copy each setting, or if
your computer allows, turn on your printer and hit "Print Screen" for each
configuration screen. Now, if your battery dies, you'll be able to restore
the basic setup of your computer in just a few minutes. The "Print Screen"
key is handy for any times when you are changing configuration settings.
Having a print out from before any changes are made makes it simple to
restore settings if need be, but a hard copy can also be used as a check
list.
- 30/ Press "CONTROL-C" to Stop any
DOS Action.
If you have issued a command and things are not going as you
intended, press "CONTROL-C" or "CONTROL-BREAK" to stop the work. DOS
checks to see if either key combination has been pressed and it will
cease operations immediately after reading that key combination. This
also usually works within a program.
To be assured that mis-commands are stopped quickly, have "BREAK" set
to "On". DOS checks more frequently when BREAK is on. You may set it to
"On" from the command line by entering" "BREAK=ON". Entering "BREAK" by
itself, tells you its status. To automate this, place "BREAK=ON" at or
near the end of your AUTOEXEC.bat.
Be aware that some programs will set BREAK to "off". You may test this
by first making sure BREAK is on, then running the program, exiting, and
checking the BREAK status again. If it resets BREAK, then place a
"BREAK=ON" command at the end of the batch file you should be using to
start that program. As you find other programs that reset BREAK, then
place the same command at the end of each of their batch files.
- 31/ Use a Phrase to Remember ANSI
Colours.
If you don't use an automated program for screen colour control,
but instead directly use ANSI.sys or an equivalent, you may have trouble
remembering the colour codes. Here's a chart for those colours and their
foreground & background number codes. Afterwards, will be a method
you can use to remember the colour order.
FOREGROUND BACKGROUND
COLOUR COLOUR
CODE CODE
---- ----
30 Black 40
31 Red 41
32 Green 42
33 Yellow 43
34 Blue 44
35 Magenta 45
36 Cyan 46
37 White 47
|
To remember this,
simply use the following phrase:
Boys
Ride
Green
Yaks,
But
Mary
Can
Wait
- 32/ Cut Off Your Mouse's Tail.
This may seem a little drastic, but at the least, learn to use a
program's keyboard shortcuts and macros. For any program in which you are
using the keyboard for data entry, such as a spreadsheet, database, or word
processor, it's much faster to not have to remove your hands from the
keys to go to the mouse, move up to a menu bar, click on a menu, run down
that menu, click on another item, run down that, and so on. If one key
stroke can do all that in place of the desk rodent, then learn that
keystroke. Even with a tool bar, this method is still faster because your
hands never leave the keyboard. You'll be surprised how much faster you'll
finish your work by learning and becoming comfortable with key shortcuts.
To facilitate efficient usage, adopt the "claw" hand method. Many, when
first learning keyboard shortcuts, will often use two hands to issue
"Control", "Alt" and "Shift" keyboard combinations. Instead, learn to use
one hand to span the keys. Typically, place the thumb or little finger on
the "Control", "Alt" or "Shift" key, span the hand and place the most
convenient finger on to the other key. You will eventually find the most
comfortable claw position of the hand and it will come as naturally to you
as a guitarist's finger patterns do for producing chords on a guitar. Your
speed will amaze even yourself as you "span" your way around a program's
abilities.
By a similar token, learn to use the program's script or macro
language. (Many are just like DOS batch files.) Program in your most
frequent operations and assign each to a convenient key or key
combination. From then on, one keystroke will eliminate almost all
desk-rodent tedium.
All this will be very difficult if you were taught computer
using a mouse. You will have to force yourself to adopt these new
techniques. However, if you can discipline yourself do this, once you
become comfortable with the equivalent keystrokes, you will never
go back to the slow, tedious, desk rodent method.
- 33/ Place Your Mouse to the
Left.
If you must use the desk rodent, place it to the left of the keyboard.
The advantage to this is that one may use the right hand to access the
Number Pad, Page Up/Down, Home/End, and Cursor keys, plus their Control,
Alt, & Shift variations -- all simultaneously with the mouse.
This is excellent for eliminating arm movements because instead of using
the cumbersome scroll-bars, the cursor or Page-Up/Page-Down keys may be
used. Fatigue will be cut back, and the possibility of developing
carpal-tunnel syndrome is lessened. As well, for many programs, the
keyboard is much faster than the hoops through which one must jump with a
mouse to navigate typical program menus.
After switching the mouse location, leave the buttons as are so that
"left-clicking" still uses the left button. This allows one to easily
follow instructions in a tutorial or book because one need not mentally
exchange the button designations.
A Mouse Substitute
Think about dumping your mouse altogether and going with a full-size,
weighted, desktop trackball. Now, you may be thinking: "Oh, those horrible
little balls...". No, I don't mean one of those laptop finger-balls, nor do
I mean one of those mouse thumb-balls. They are horrible. I am
referring to a stand-alone, large, desktop unit containing a trackball the
size of at least a billiard ball. In some models, the size approaches that
of a softball.
The advantages of it are that it is always on the same spot on your desk,
you can never run out of `mouse' pad, and arm/wrist movements are greatly
diminished. If a weighted one is used, one may also spin & release it
to quickly park the on-screen pointer in one corner or another of the
screen.
I also find a trackball better during sensitive work, such as pixel-level
graphic manipulations. After positioning the pointer, I can easily lift
my hand or fingers off the ball and then click without disturbing the
pointer location. The trackball housing is rooted to the desk and is much
more solid and stable than the movable mouse. I use the excellent
Kensington "Expert Mouse", Model #64215 both at work and at home.
|
Another Extra-Extra Tip:
When the trackball begins to skip, becomes sluggish, or is slippery to
grip, remove the ball and clean it with methanol or rubbing alcohol. Then
take fine-grit sandpaper and cup it in the palm of your hand. Turn the ball
within the sandpaper while applying pressure so that the ball's surface
becomes dull. Lightly sand the entire surface of the ball. Clean once more
with alcohol and replace. You will find the trackball will work as new. Do
this whenever the ball becomes shiny from usage.
|
- 34/ Reduce Environment Memory
Load.
Many programs require or, at least, often prefer that a DOS
environment variable be set. This is to direct the program to required
files, to direct it as to where to place & find temporary files, or to
set other parameters. Most have the user place the command in the
AUTOEXEC.bat. However, this means that this information is always in
memory and taking up space even when their companion programs are not
even loaded.
The solution is to place the "SET" command for each program within the
batch file you should be using to start that program. Place it on the line
just before that which starts the program. After the program-starting line,
place another that reads SET parameter= . Note that
nothing is to follow the "equals" sign. This removes the variable from
memory as soon as the program ends by effectively setting it to
`zero'.
The advantages to this are less memory used when the program is not
running, a faster bootup (since the variables are not set at that time),
and it keeps all program starting commands, switches and variables in one
file. The latter is handy for personal reference and for computer
housekeeping purposes.
To see how much memory is taken by your current environment, issue:
SET > SIZE.ENV. This saves it to a file. Now enter:
DIR SIZE.ENV. and look at the file size. It will be slightly
larger by a few tens of bytes than the memory used because the file
itself requires some disc space. However, this will give you an idea of
what is being used. You may cut back on the room allocated for the
environment through the "SHELL" command in the CONFIG.sys file if too much
has been assigned. See your DOS manual for instructions. Don't make it
too small though; you'll need space for any temporary variables created by
your and/or your batch files.
Be aware that some DOS versions come with SETLOCAL / ENDLOCAL commands
that will allow one to save the current environment and other settings, then
select or make a new set. Once done, the ENDLOCAL command restores your
computer to the settings as they were at the time of issuing `SETLOCAL'.
Using this feature means that only the settings required for any given
operation(s) will be invoked, thus keeping settings organised, and to a
minimum.
A Memory and Time Saver
For those environment variables that you
issue via your AUTOEXEC.bat, be sure to place
"SET" commands after those loading drivers
or other programs whenever possible.
If they are located before the lines used to load
drivers or other programs, DOS passes the information
to each of those that follow, whether those programs
use the information or not. This takes time and uses
memory unnecessarily.
|
- 35/ Increase Your Keyboard Buffer
Size.
If you find during fast typing that keystrokes are no longer being
accepted and the computer beeps, or if you hold down a cursor key and a few
seconds later a series of beeps emanates, the keyboard buffer has filled.
You must then wait for DOS to process the keystrokes to be able to
continue.
When a key is pressed, the key code goes to a holding area called the
"keyboard buffer". There is only so much room, so if one types quickly or
is using a slow program, it will fill. Eliminate this and the associated
wait by increasing the buffer size. MS-DOS 7\DOS 95 and later allow
this as do modern DOS versions, but there are many after-market programs
available for those using earlier versions. I use ANSIPLUS by
Kristopher Sweger. My buffer has been increased from the DOS default of
15 characters to 128. I have yet to overflow it.
The advantage of this is more than just being able to type farther
ahead on say, a word processor. It also allows you to program ahead.
That is, you may issue a series of commands that might ordinarily
overflow the buffer, but that will continue to be accepted and
issued in turn as the program becomes ready to accept them. Thus you may
type those commands and then leave the keyboard to do other things while
the program runs unattended. With a menu system, this is not possible
because one must wait for the next menu in order to click on the next
command. On the other hand, well-written menu systems have first-letter
commands that can sometimes be implemented without the menu having to be
on screen. For systems with that ability, one may use this trick with them.
- 36/ Use a Key Stacker.
For programs that do not accept command-line start parameters, one
ordinarily would start the program and then have to issue a series of
commands to get to the start-up screen of choice or to load a file on which
to work. With a Key Stacker, one may start the program and issue those
keystrokes directly from the command line all at once.
The key Stacker program takes the commands from the
keyboard buffer and enters them just as though you had typed them yourself
after the program had started. Place these into a batch file and one may
start any program and reach any screen or do any work by just issuing the
one batch command. Again, I use ANSIPLUS. (Note that some software
authors have implemented measures to thwart this capability. Although some
keystacker programs have ways around that, you may come across the odd
program that won't allow keystacking.)
- 38/ Set LASTDRIVE to the actual
Last Drive Letter Used by your System.
Your CONFIG.sys assigns the last drive letter used by your system.
Some setups have it fixed much higher to allow for user mounting of external
components such as USB flashdrives. These are assigned a drive letter as
required. Each drive letter uses memory, so an excessive number wastes
it. The amount is small, typically 176 bytes, but on memory-strapped systems,
it may be a factor.
Inventory the fixed drives on your system and then
add letters to account for an external hard drive, camera, flashdrive and
so on. Add only enough letters to cover such devices plugged in at the same
time. If you only mount one of them at a time, add just one letter. Edit
CONFIG.sys to reflect this actual last drive letter and you will save
memory.
- 38/ Make Use of Command-Line
Utilities.
Many programs are accompanied by utilities that may be used outside
the program itself. As well, there are zillions of stand-alone utilities
available that can accomplish small and large tasks. These might perform
file conversions, screen captures, font changes, text search &
replacement, function-key programming or even complete keyboard re-mapping,
among many other chores or assignments.
Don't be afraid to use old ones, either. They can still perform useful
functions, even in today's computer world. I still use various utilities
from 1988! They do exactly what I want and I can't think of an improvement
that a modern version might incorporate. Most will run fine on fast
computers and under the most recent DOS versions. Some of them may
not present themselves well on the screen because they might use only
four-colour graphics, but so what? If they perform a useful function, they
come & go so quickly, that this is of little consequence except to the
most eye-candy conscious. For those persons, it may be possible to hide
the output and substitute one's own, or to dispense with it all together
if a visible result is not necessary or desired. (See the Extra Tip,
below.)
The best utilities to use are those that are small (under 50k), are
not memory resident, and that serve just one function. This means that
they do not take up precious Lower or Upper Memory, and that they execute
very quickly. The former is less of a problem in the 21st century because
so many of today's DOS utilities use Expanded or Extended Memory. The latter
is good because when a utility executes quickly, there are no delays when
using it, except on the slowest of processors. That means one may string
several of them together in a batch file to accomplish very specific tasks
- all with one command or keystroke, and without having to actually start
some program and deal with its interface.
Set utilities up to run from batch files via their command-line
switches so that the program interface need not be seen. Make them able
to work automatically on all the files in a directory, or on specific
types of files, or on only those you specify along with the utility name.
With a single command, the work will be done! For really fast work, assign
your most commonly used utilities to function keys. (See #47.)
For more on command or program modifying, see
DOS Switches, and view the
Batch File Tutorial to see how to make these
utilities work for you with a minimum of hassle by placing the commands
into simple batch files.
`Invisible' Screen Messages
and Prompts
To learn to hide output, read up
on the following possible methods:
- Redirect output to nothing via `> Nul'.
- Redirect output to a file via `> filename.ext'.
- See if the utility you use has a quiet or non-verbose mode
via issuing `/q' or `/v-'.
- Use `CTTY NUL' before the command which output you want
muzzled and `CTTY CON' afterwards. (Note that these two
commands must be used in a batch file because typing `CTTY NUL'
would transfer control away from your keyboard and monitor,
thus no input from the user would be recognised when typing
`CTTY CON' afterwards.)
|
- 39/ Use DOS to Run Your GUI.
Most modern operating systems come with DOS, a DOS emulator, or a
DOS-like command-line interface. Learn to use it to automate the tedium out
of point & click menu surfing and tree climbing. Using batch files, and
just direct issuing of commands are often shorter and easier than navigating
endless menus and pointing at each individual step to complete a task.
- 40/ Use the Latest DOS
Version.
Many people believe the latest DOS version is MS-DOS 6.22. Well,
it is almost thirty years old! Many new versions have been developed by
other companies since then, and because they are newer, they have
capabilities that the old Microsoft one doesn't. These versions are much
more powerful and add a lot of new abilities to DOS. Included are updated
DOS commands, memory management, FAT 32 capability, and so on.
This tip couples with the next one:
- 41/ Obtain the Latest DOS Command
and Utility Updates or Replacements.
As you read in the last tip, just because Microsoft has ceased
developing DOS, does not mean others have. Even if you wish to use an older
DOS version, you may add capabilities to it by after-market products.
Some updated or replaced commands and utilities that come to mind are
ANSIPLUS, ColorDIR, EKKO, TODDY, XSET and XXCOPY. DR-DOS has XDIR and XDEL.
The `X' in these commands typically stands for "extended".
Another is 4DOS. It is an updated command shell that completely replaces
COMMAND.com (the DOS command interpreter). It comes with improved internal
commands for both batch files and the command line, and it has many, many
built-in environmental variables. 4DOS is extremely powerful and is highly
recommended. Its latest version (8.0) came out in 2009, but it can easily
hold its own in the 2020s!
FreeDOS is also currently available for use and continues to be actively
developed.
- 42/ Place Important Files First or Last
via the Use of Special Characters.
Even with an alphabetical list, in a larger directory, it may take
a bit to locate a desired file. It would be great if this file could
always be first or last in a directory listing. The solution is to use
one of the special keyboard symbols as the first character in the file
name.
This first list gives the symbols that show at the top of an alphabetical
DOS "DIR" listing when used as the first character of a file name. They
are in order from top of the directory listing on down.
- Exclamation Mark [ ! ]
- Octothorpe [ # ]
- Dollar Sign [ $ ]
- Percent Sign [ % ]
- Ampersand [ & ]
- Right Single Quote or Apostrophe [ ' ]
- Opening Parenthesis [ ( ]
- Closing Parenthesis [ ) ]
- Dash [ - ]
Have one of these as a first character in a file name and it will be
shown before those starting with numbers or letters. If you have other
important files in a given directory then use other characters from the
list. The above is the order in which these files will appear. Realise that
not all directory programs may adhere to this order.
After the above, files beginning with a number appear in order of Zero
[ 0 ] through Nine [ 9 ]. Then one more symbol character will appear before
the files starting with a letter. It is the "At" [ @ ] sign. However, the
"dot" and "dot-dot" representing the current and parent directories come
first as thus:
- Current Directory [ . ]
- Parent Directory [ .. ]
- Numbers [ 0 1 2 3 4 5 6 7 8 9 ]
- At Sign (Asperand) [ @ ]
- Letters [ A through Z ]
Regarding numbers, if you have file names using numbers that exceed
`9', the order will not be numerical. So if you have a file name beginning
with `1' and another beginning with `10', the order will be:
1
10
2
...
To get around this, always use `0' placeholders:
01
02
...
10
This applies regardless of where numbers appear in the file name. It
becomes more complicated though, if the numbers fall in the middle or end
of the name when there are more or fewer letters before those numbers
compared to other "number" file names. Experiment with this to see the
order in which your files appear.
Now to finish up, here are first-character symbols that cause a file
to appear at the bottom of a file listing: These are in order from
middle of the listing on down to last place.
- Circumflex [ ^ ]
- Underscore [ _ ]
- Left Single Quote [ ` ]
- Left Brace [ { ]
- Right Brace [ } ]
- Tilde [ ~ ]
Be aware that it's possible that under rare circumstances, having a file
start with certain ones of the characters shown in the above lists might
interfere with a DOS operation. The most likely ones to cause problems are
the Dollar Sign, Percent Sign, At Sign, and the Tilde. These are used by
DOS for certain purposes, but given that these are legal DOS characters
for file names means that DOS should recognise that a file exists with such
a character and act accordingly.
I have not had a problem, so I don't recommend not using these, but if
odd things happen with directories containing files which first character is
one of the above, test to see if it is interfering by changing that
character.
Realise that there are many other ASCII symbols that may be
used. They may be created at the DOS prompt by holding the ALT key and
typing a number on the number key pad. After releasing the ALT key, the
symbol appears. A list of these may be found in many DOS books or at ASCII
websites. Experiment with them to see where they fall within a directory
listing.
Finally, you may also apply this technique to directory names if you
want to have those also in a specific order.
Dates as File Names
If you use numerical dates as file names, be sure to employ
the ISO date format of YY-MM-DD, YYYYMMDD, or YYYY-MM-DD if
using long file names. Doing so will assure that your files
are in numerical and chronological order.
|
- 43/ Install a Scroll-Back
Utility.
Missed that error message? Need to see that directory listing from
several screens ago? Use a scroll-back utility. It allows the user, via a
hot key, to look back through previous screens to view the output there.
Some will even show the last screen of some text-based applications. It
will often even allow one to scroll "outside" of the current application
to see those bygone screens. I use ANSIPLUS.
- 44/ Keep Software and Utility
Discs inside their Original Packages.
This has a number of advantages. The first is that the discs
are likely to be better protected within the manufacturer's packaging
as opposed to being out in the open, or in some rack or storage
carousel, or in a flip-top box.
That aside, locating a disc when needed is generally far easier if it's
in the box with all its documentation, or in the pouch provided with its
book. A plus to this is that you have both the disc and its information in
one location. You'll find this a bonus if years after buying a particular
software or reference book, you'll find that it's needed but will have
forgotten some aspect of its operation. Having the documentation right there
relieves one of the frustration of searching for it in another location.
Keeping all items together also saves having two separate storage systems.
Reserve just one shelf or book case with everything organised
collectively.
Finally, if you decide to sell or give away the software, the recipient
will be much happier if he gets the entire package that came with it. This
is never more so true when it is a book with an attached disc. I can't tell
you how many times I have located a desired book at a yard sale or similar
only to discover the disc is gone. )-:
Please save your future recipients from that disappointment and keep the
disc with the book or package.
- 45/ Reconsider Before Discarding
Corrupted Discs.
Those discs may not actually be corrupted. If you have portable
drives such as an external floppy, zip, CD, DVD or hard drive, and carry
the drives and their discs during cold weather, they may need to be warmed
and dehumidified before usage. Using them while they are cold or immediately
after bringing them into a warm area, one may encounter faulty reads
resulting in the assumption of disc or drive corruption. Moisture can
condense on heads and exposed discs during ambient temperature changes.
Wait until the drives/discs have warmed and moisture has evaporated
before trying again.
If a moisture problem is suspected, you can try placing the disc into
an enclosed container with silica gel. Warm the gel in an oven to drive
out moisture as per the manufacturer's instructions. Then place it and
one or more discs into the enclosed container for a while. The gel will
absorb moisture.
A faster method is to place a disc under an incandescent floodlight for
a short time. I use a 75R30 lamp placed about 20 centimetres away from a
disc for about 30 seconds. Feel the disc from time to time to be sure it
is not hot to the touch. Too much heat will destroy a disc's
information forever.
If magnetic-storage discs still won't read properly, try using a
recovery utility to revive them. I use Norton Utilities' DISKTOOL
program and have brought back information I thought was lost.
- 46/ Become Aware of all of a Program's
Capabilities.
This includes your operating system and accompanying utilities. Too
often I have seen, or heard of, users purchasing new software or upgrading
to newer versions so as to obtain some desired capability before they have
reviewed what is already in their own libraries. I frequently get comments
about the age of some of the programs I use until I explain that despite
the eras of those programs, I use them because they already have the
capabilities required for modern tasks. Marketers will hate this, but why
buy new if the present one does what I want?
To this end, if you discover some fresh interest that has resulted in new
task requirements, look through your current softwares' manuals or on-screen
help systems to see if some or all of that required capability is already
available. If so, it has saved you money on, and time spent installing &
learning, a new program!
- 47/ Assign Batch Files to Keys.
For batch files you use most frequently, assign them to function keys.
Or if you wish to preserve those keys for DOSKEY or other utilities, have
the batch files run via Alt-Letter keys. This saves typing even short batch
file names over and over. Just saving these few keystrokes makes a huge
difference during lengthy computer sessions. I have used them for so long,
that they are as commands themselves and are intuitive within my day-to-day
computing chores. Keys may be reassigned from within DOS by using PROMPT or
ECHO commands, or via ANSIPLUS, DOSKEY, 4DOS, TODDY, or a similar utility. I
use ANSIPLUS.
ASSIGNED-KEY EXAMPLES:
Bypass the Long Discussion of Examples
Coming up are just a few of the reassigned keys that
I use to implement batch files and utilities while working in DOS. Some of
them function under specific circumstances, but I won't get into those here.
Nor will I discuss what is going on behind these commands. I just want these
descriptions to give you an idea of the capabilities I have available
by using this method. I hope they will inspire you to use more time-saving
keystrokes in your daily computer operations.
Since all my key reassignments are in memory, and so is every batch
file and the DOS commands they call upon, these execute
instantly. I love to watch a GUI (Graphic User Interface)
user's jaw drop when he or she sees how fast things happen using this
method -- even on slower processors. You've heard the term: "Greased
Lightning" ? Well, this setup is Teflon Lightning! (-:
Here we go...
-
F1 invokes my DR-DOS "Help" system, while Alt-F1 adds a
space and `/?' on the command line, and presses "Enter" for me. That's great
when I need to get a fast list of switches for any command. I hated having
to type that space, `/?' and "Enter" after a command name every time, so
I programmed that sequence to a function key.
In a similar fashion, I programmed Alt-8 to type `*.*' because I
hated typing that all the time too. Note that the asterisk is above the
`8' on the number row above the alphabet keys, hence my reasoning for
using that key to invoke the macro.
-
Control-F1 clears the screen. It saves typing "CLS" and hitting
"Enter". Control-F2 clears the screen and presents a wide-format,
alphabetical listing of the current directory with each file type in a
different colour. Control-F3 returns to the root directory of the
current drive, clears the screen, and presents a colour directory listing
of files there.
-
Alt-d and Alt-u go to my DOWNLOAD or UPLOAD directories,
which I use constantly while on and off line. A list of files is then
displayed alphabetically in wide format with each file type in a different
colour.
-
I sometimes play audio CDs when I am at the computer. To gain maximum
memory efficiency, I usually don't leave the player program in memory.
Instead, I have it able to be started via a batch file that I then
assigned to Alt-c. It's a simple matter to shell out of a program,
hit Alt-c, adjust the volume or change the disc or track number,
quit the CD program, and then type "EXIT" to return to my program.
But wait!
That's just not good enough.
Let's go farther:
-
I also assigned "EXIT" to Alt-x, so I don't even have to type
that. Also, I have the batch file that is keyed to Alt-c, set up
to automatically unload the player program from memory, so I preserve
maximum memory. Once the CD is playing, it will continue until it receives
another command, so the program is not required to be in memory during
playback.
but..., you think: There's still a lot of typing to shell out
of one program, start the CD program, and then return to where you were.
You are absolutely correct. That's why I assigned a key macro within
those programs to automatically shell out and start the CD program. When
I exit the CD program, I am automatically returned to where I was working
with no further input required from me. So, with one keystroke, I am in the
CD program, and one more within the CD program will exit, remove it from
memory, and return me to where I was.
Should I ever need to go to the CD program a lot, I could still simply
leave it in memory and have direct access to it all the time through its
own hot keys. The point is I have a variety of choices -- all of which are
fast & efficient, and not a desk rodent in sight. (-:
-
I use Alt-v to load the listing of the current directory into my
file viewer from which I may select one to look at. I use Central Point's
VIEW.exe for this. It comes with PC Tools and is capable of showing text,
spreadsheet, database, word processing and other files types from a variety
of software manufacturers. (There are other file viewers available that
allow manipulation of the files, as well.) File viewing from the command
line is extra handy because I don't need to load the original program if
all I need is to quickly look at a particular file.
-
Alt-g starts a simple graphics viewer in any directory for a
quick look at any .bmp, .gif, .jpg, .pcx, .tga, etc file.
-
Alt-r returns to my desktop and resets to my standard prompt,
colour scheme, cursor size and flash rate, and text type.
-
F9 is my Auto-Complete key. I type the first few letters
of a directory or executable file name in the current directory, press
F9 and that name will be completed. It is directory aware so that I can
auto complete a directory name, add a backslash and a letter, and it will
auto complete a subdirectory name within that directory regardless of
the drive on which it resides. Finishing up, I can type a few letters
of a file name within that remote directory and it too will be completed.
In addition, I can type a command such as REN, the first few letters of
a file, then F9, and the file name I wish to change is completed for me.
This is done for me via Toddy, a command-line utility similar to DOSKEY,
but much more powerful. Toddy also allows me to type the first few letters
of a previous command, hit TAB and it will be completed automatically as
well.
-
F10 displays the current directory in wide format, alphabetical
order, and with each file type in a different colour.
-
F11 tags a directory to which I wish to return. F12
returns me there whenever I want, from any drive or directory, anywhere on
my computer. This can occur even after a reboot! When returned, a list of
the files in that directory is displayed. (See "RETURN.bat" in
Advanced Batch Files for a look at how the
F11 & F12 batch files work.)
I also have three other key assignments that can be programmed to return
to any one of three directories. These are programmed on the fly so that
when in any directory, I can hit Alt-Delete, Alt-End, or
Alt-Page Down, to tag a directory, To return to any of the three,
I hit the equivalent key but instead coupled with the Control key.
So as an example, to tag a directory, I can hit Alt-End and to
return to it I press Control-End. These three are independent of the
F11 & F12 keys described above. I use these three
assignments during operations in which I need fast access among several
directories -- regardless of the drive on which those directories
reside. These assignments also survive reboots.
What happens if I forget where these key assignments take me? To the
Page Down key, I programmed a list that displays the current assignments,
and it is updated whenever I change any one of them. This only happens in
DOS so any software that uses Page Down, such as a word processor, is
unaffected. I can even shell out of that word processor and the Page Down
key will revert to its DOS assignment, but yet it returns to its regular
Page Down operation after I return to the word processor. Slick, huh?
-
In keeping with the above, Control-F12 toggles back & forth
between the current and last directory accessed. This changes as I change
directories, so that if I am in my E:\GRAPHICS directory and wish to change
to my C:\UTIL directory, I do so via whatever method I choose. Then I can
hit Control-F12 to return to E:\GRAPHICS. If however, while in
E:\GRAPHICS, I change to E:\TEST, pressing Control-F12 still returns
me to C:\UTIL, but pressing Control-F12 again now returns me to the
new `last' directory: E:\TEST.
I call this the last example the `A-B' method. The idea was taken from
television remote controls that work in the same manner. To explain further:
If one is on Channel 3 and wishes to change to Channel 29, `29' is pressed.
Hitting the `Recall' button returns one to Channel 3. Further, if one is on
3, goes directly to 29, as above, and while there presses the `Up' button
to check the temperature on Channel 30, then presses the `Down' button to
return to 29, hitting the recall button still returns one to channel 3 and
not 30. This is because the `A' side of the `Recall' operation was never
changed from Channel 3 to something else.
Essentially, Channel 3 was programmed into the `A' side of the `Recall'
operation, while 29 was programmed to the `B' side. Moving from 29 to 30
and back again via the `Up' and `Down' buttons only changed the `B' side.
If the remote had been left on Channel 30 and the `Recall' button pressed
to go to Channel 3 then pressed again, Channel 30 would have been the result.
Thus pressing `Recall" at any time always returns one to the channel
programmed into the opposite slot. In this case, it will be Channel 3 until
one either changes 3 by moving up or down and staying at the new channel
or by directly entering another number while on Channel 29. Sadly, few
remotes work this way any more. They all want to return to the immediately
previous channel even if using the `Up' and `Down' buttons. )-:
Getting back to my computer setups, this, and the previous `Directory
Return' macros, are examples of dynamic batch file writing in which
additional batch files are actually being written (or rewritten) in the
background as I press various keys. Each is then ready to return me to
where ever I was last, or to any of several directories I had chosen
previously. These extra batch files allow me to access information about
these changing key assignments and to display them on screen at the touch
of a key macro.
Although I won't go into detail here, I use the same technique for a
number of other operations such as file editing. Regarding the latter,
additional batch files are automatically written during file viewing that
will automatically place the name of the most recent one viewed into a batch
file so I can edit it should I choose. For all cases, these "sister" batch
files track along with the primary ones in that they change as do the
primary ones while I work.
-
Alt-i moves down one level into an IMAGES directory and shows
a list. I have many directories containing files that have associated
images. This is especially true with my Internet html directories. Whenever
I am in any of those directories, a simple ALT-i immediately places
me into the images directory associated with those .htm files. To then view
any graphic image, I can press ALT-g, as mentioned farther back.
-
Alt-k. Similar to the above Alt-i, this shortcut moves
down one level into a WORK directory and displays any files contained
therein. As with the IMAGES directories, I often create WORK
subdirectories within many directories. I copy files to the WORK from its
parent directory when I wish to preserve a parent directory file as-is until
I replace it with the version being worked upon.
This allows me to keep the parent directory uncluttered. Plus, one
quick check of any work directory immediately shows me if I have anything
on going. The Alt-k shortcut allows this quick check in an
effortless way. (I don't use `Alt-w' for this macro because that is
programmed to start my word processor.)
-
Control-l invokes a small DOWN utility that moves down one level
to the first available subdirectory. To go to the next sister directory, I
have Control-n run a NEXT utility. This way, I can move into each
subdirectory without ever having to type the path or even the directory
name! Alt-l moves up one level to the next highest directory.
With a combination of the above three, I can move up & down my
directory structure at will just by Alt and Control key combinations -
again never having to type a path or directory name, should I so choose.
In all cases, the directory contents are displayed in alphabetical order,
wide format with different colours for each file type. I often employ
these after using the Alt-i or Alt-k shortcuts, to quickly
return me to the parent directory or move to an adjacent or lower
directory.
-
Alt-4 Takes me into 4DOS, while leaving DR-DOS suspended in the
background.
-
Alt-z expands any .zip files in the current directory. It
keeps the zip file, but my varied key reassignment, Control-z,
expands the contents and deletes the .zip file afterwards.
-
Control-f deletes all files in the current directory with
absolutely no questions or prompts. BANG! All gone! An automatic
listing after the operation confirms the directory is empty.
That was just a small sampling of the many keyboard reassignments
I have at hand. They do all of my repetitive work and much of the
less typical work I do at the computer. Initially, there was some
thinking involved to recall them all, so of course, I wrote a batch
file to list the macros, in case I forget. (-:
After a while, the key shortcuts become so ingrained that one
no longer really thinks about them. At that point, one becomes
a true power user and can run circles around any GUI interface.
...and now, one final tip:
- 51/ Buy DOS Books.
DOS has been around long enough that many publications are easily
available at used book stores for excellent prices. You don't necessarily
need one geared to your DOS version because, despite differences, DOS
versions have remained true to one another. A good library of books is a
must if you are thinking of becoming a power user, or just wish to improve
your DOS operating system knowledge. See this website's
DOS Publications section to get started.
Look for books with included discs. Many will have very useful utilities
-- even for today. Remember, because DOS has remained true to itself, old
DOS programs will run on new versions and new software will run on old DOS
versions at least since 1991. This is with very few exceptions.
Be sure to check
DOS Websites
to see links to some of the
programs listed in this article.