home *** CD-ROM | disk | FTP | other *** search
-
- SKIP'S COMPUTER MISCELLANEA
-
- #2
-
- (C) Copyright 1988 by
- C. F. "Skip" Mowery, Jr.
- Colonel, USAF (Ret.)
- 406 Van Reed Manor Drive
- Brandon FL 33511
- 813-689-4212
-
- "Skip's Computer Miscellanea" is copyrighted material and remains the
- property of the author, who reserves all rights to its publication,
- reproduction and distribution, with the following single exception: it
- may be freely copied and distributed electronically via computer for
- personal non-commercial use, provided that the content is not modified,
- that it is not copied to or distributed on any form of print media and
- that it is not copied or distributed by or for any type of business
- endeavor without the prior written permission of the author.
-
- *****
-
- Your comments about this material and questions about any aspect of
- computing are welcome. This material originates on the Computer
- Archives BBS in Tampa, Florida, at 813-968-6220.
-
- *****
-
-
-
- Part 2 of "Getting Organized With a Hard Disk"
-
-
- Hard Disk Organizational Tools and Terms
-
- In order to facilitate the organization of your hard disk, you
- should become familiar with a few tools and terms that will make this
- relatively easy job even easier. You don't have to be an expert -- all
- you'll need is the knowledge that these tools exist and a general idea
- of what they do. Some are equally significant for floppy-based systems
- and you may already be familiar with them. Here they are:
-
- AUTOEXEC.BAT -- This is a file that contains commands that
- you want the computer to execute every time you boot. I'll be giving
- you some ideas about what to put in it.
-
- PATH -- This is something you will put in the Autoexec.Bat
- file to tell the system where to look for files. It's just a list of
- drives and directories in the order that you want the system to search
- them when looking for a file. I'll tell you exactly how to do it.
- Whenever in this article I refer to PATH (in upper case), I'm referring
- to this command. We'll also discuss path (lower case in this article)
- as one of the elements in a command line: the element that tells the
- system the route to follow to get to a directory or file name referred
- to in the command. The distinction between PATH and a path will become
- clear as you read along.
-
- CONFIG.SYS -- As the name implies, this is a file that tells
- the system how to configure itself for your applications. I'll show
- you how to create it and what to put in it.
-
- Batch Files -- These are text files that you create, with the
- extension .BAT, that usually include several commands for the system to
- execute and that save you having to type in certain command combina-
- tions that you use frequently. I'll give you some specific examples.
-
- Directories -- You can read your DOS manual's description of
- these, but all you really need to know is that directories are like
- file dividers or category designators. Imagine setting up a paper
- filing system in one file drawer. You break down your files into
- general categories, each file divider has the name of a category, and
- you put all files related to one category behind that file divider.
- For example, you might have a category called "Correspondence" and
- another called "Bills". In the same way, your hard disk will have the
- files stored behind file dividers with category names -- except that we
- call the dividers/categories by the name "directories". (Depending on
- how well organized your floppies are, you could also consider a
- directory as the equivalent of a floppy disk, but without the storage
- limits of the floppy.)
-
- Subdirectory -- Continuing the comparison to a one-drawer
- filing system, once you have general categories established, you may
- want to divide some of them into smaller sub-categories, which on a
- disk we call subdirectories. For example, the "Correspondence"
- directory may have subdirectories named "Personal" and "Business". The
- "Business" subdirectory might then have its own subdirectories named
- according to the companies that the correspondence applies to.
-
- Root Directory -- This concept is easier to understand than
- it is to explain. I have compared directories to the dividers in a
- filing system. The root directory might be compared to the label on
- the front of the file drawer, or a list in the front of the drawer,
- that tells you what categories of files are included in that drawer.
- (You might even consider the root directory as the drawer itself.) Your
- DOS manual will compare directories and subdirectories to an inverted
- tree (hence the term "root"), and many directory-listing utilities will
- refer to the list as a "Tree". I prefer to think of the root directory
- as the top box on an organizational chart. At the top is the office of
- the chief executive; under that are the various divisions of the
- organization (directories); and under each division there may be
- subdivisions (subdirectories). If you want to think in terms of floppy
- disk organization, the root directory might be considered the equiva-
- lent of your system disk -- the one you boot from and that has other
- key programs on it. More about this later.
-
- MD -- This command (Make Directory) tells the system to
- create a new directory or subdirectory. [Every formatted disk, floppy
- or hard, already has a root directory (which is why I said above that
- you could compare it to the file drawer itself) and does not need to
- have one created via MD.]
-
- CD -- This command (Change Directory) tells the system to
- devote its attention to a different directory or subdirectory.
-
- Current Directory -- We usually refer to being "in" a
- directory. The current directory is the one you are currently in, the
- one the system is currently devoting its attention to. If you are in
- one directory and want to be in a different one, you use CD (see above)
- to move from one to the other.
-
- Default Directory -- The current directory is also referred
- to as the default directory, i.e. the one you're in. For example, if
- you enter a command to run a program and don't specify where the
- program file is, the system will look for it in the current directory
- (i.e. the program location will "default" to the current directory).
-
- RD -- This command (Remove Directory) tells the system to
- delete a directory or subdirectory. You can't delete a directory or
- subdirectory unless it's empty, i.e. has no files in it.
-
- RENDIR.COM -- This is a small program that can be downloaded
- from a BBS that will enable you to rename a directory or subdirecto-
- ry. It's not essential to have this, but it's a lot easier than the
- DOS procedure, which would be to create (CD) a new directory, copy all
- the files from the old directory to the new, and then remove (RD) the
- old directory name. For some reason, the authors of DOS did not
- include a rename-directory command in the system. (Some file-manager
- programs and other utilities also include directory-renaming as one of
- their functions.)
-
- \ (Reverse Slash) -- The reverse slash is the symbol the
- system uses to identify the root directory, to separate directories
- from subdirectories and/or to separate directory names from file names.
- Standing by itself in a command (e.g. CD \), the \ stands for the root
- directory. On my keyboard, the reverse slash is in the bottom row,
- between the Alt key and the space bar. (In other words, it's usually
- hidden under my left hand, which sometime makes it a pain in the tush
- to use.)
-
- A Brief Tutorial on Paths
-
- When you're organizing your hard disk with directories and subdi-
- rectories and copying files to them, you have to be able to tell the
- system where to find things. Suppose you want to copy a file named
- TEST.DAT from a directory named SOURCE on a floppy disk in drive A: to
- a subdirectory named TARGET on your hard disk, which we'll assume is
- drive C:, and that TARGET is a subdirectory under a directory named
- DATA.
-
- Drive A: Drive C:
- | |
- Root Directory Root Directory
- | |
- SOURCE Directory DATA Directory
- | |
- TEST.DAT File TARGET Subdirectory
- |
- (Destination of File)
-
- The COPY command requires two parameters: the source and the
- target. The source parameter tells the system the location of the file
- to be copied and what the file's name is, and the target tells where
- you want the file copied to and, optionally, what name you want the
- file to have when it's copied to that location.
-
- In order to avoid discussing defaults and wildcards at this point,
- we're going to assume also that you are currently in drive B: and that
- you want TEST.DAT renamed to WORKING.DAT when it is copied to the
- subdirectory named TARGET on your hard disk. Hence, we will have to
- tell the system about drive A: (the source) and drive C: (the
- target), and we will have to provide the full file names for both the
- source and the target.
-
- If we didn't have directories involved, our copy command (inclu-
- ding the renaming of the file) could look like this:
-
- COPY A:TEST.DAT C:WORKING.DAT
-
- But both the source and the target in our example have directories and,
- hence, we have to tell the system where to find the file to be copied
- and where to put the copy. That's the job of the path. A path
- specification will tell the system what route to follow to get to the
- source and another path specification will tell the route to the
- target. (When no path is included, the system will look for the source
- either in the current directory or, if you include a drive designation,
- in the root directory of the designated drive, and the same rule
- applies to the source.)
-
- Thus, in our example, both the source and the target specifica-
- tions must tell the system three things: the drive designation, the
- path and the file name. You already know about drive designations and
- file names. The reverse slash (\) will help us and the system to
- identify the path.
-
- COPY A:\SOURCE tells the system to go to drive A: and look in the
- directory named SOURCE. Then we use another \ to identify the file
- name: COPY A:\SOURCE\TEST.DAT. That takes care of the command and the
- source parameter for our copying example. (Hold your questions until
- later. I hope eventually to cover everything you have doubts about
- now.)
-
- For the target parameter in our example, things get a little more
- complicated because of the subdirectory, but you should already have a
- pretty good idea of what we need to do. Here's the full comand:
-
- COPY A:\SOURCE\TEST.DAT C:\DATA\TARGET\WORKING.DAT
- ^ ^ ^ ^ ^ ^ ^ ^
- command ---^ ^ ^ ^ ^ ^ ^ ^-------- file name
- source drive --^ ^ ^ ^ ^ ^-------- subdirectory path
- directory path -----^ ^ ^ ^----------------- directory path
- file name ------------------^ ^----------------------- target drive
-
- Note that we had to tell the system exactly what route to follow
- to get to the subdirectory in the target. One reason for this is that
- you may have two or more subdirectories with the same names but under
- directories with different names, and the system wouldn't know which of
- those subdirectories you were referring to if you didn't include its
- parent directory in the path. (The directory under which a subdirecto-
- ry is placed is called the parent of that subdirectory.)
-
- Now let's get to your questions. What if a subdirectory has its
- own subdirectories? Are they called sub-subdirectories? And if there
- are lower levels, are they called sub-sub-subdirectories, etc.? You
- can call them that if you want to, but my preference is either to refer
- to the major directories (the ones listed in the root directory) as
- directories and anything else as a subdirectory, or just to call all of
- them directories, whether they are at the top or bottom or in between.
- This possible confusion is one reason why you should avoid having too
- many levels of subdirectories. Another reason is that it takes the
- system longer to find sub-sub-sub-...directories.
-
- Next question: Why did we include the first \ in our copying
- example above -- wouldn't the system know that SOURCE is a directory
- name? In this case, the answer is yes, the system would know without
- the first \. However, in other cases, it depends on what directory
- your are in when you compose a command and the nature of the command.
-
- To avoid a lot of complications, let me suggest two things.
- First, understand the distinction between a full path and a relative
- path. A full path always begins with a \ and includes the entire path
- specification, beginning at the root directory. A relative path never
- begins with a \ and is used to refer to directories below the current
- directory (i.e. the one you're in). Second, I virtually always use the
- full path in order not to have to worry about where I am and whether I
- can use a relative path, and I suggest you do the same.
-
- Using the full path avoids a lot of confusion. Assume for example
- that you are in a directory named WORKING, and that it has a subdirec-
- tory named WORK3. How would you copy the file TEST.DAT from the
- WORKING directory to its WORK3 subdirectory? If you enter COPY
- TEST.DAT \WORK3, you will wind up with the TEST.DAT file renamed to be
- WORK3 and residing in your root directory!
-
- Thus, if the target is a subdirectory of the current directory,
- you have two choices:
-
- COPY TEST.DAT \WORKING\WORK3
- or
- COPY TEST.DAT WORK3
-
- The first example avoids all confusion by including the full path. In
- the second example, using a relative path, the system assumes that you
- know what you're doing and shows how smart it is, which brings up and
- answers another question (and explains the second example).
-
- Is it possible to have a file and a subdirectory with the same
- name in the same directory? No. In the command COPY TEST.DAT WORK3,
- you might have intended just to make a copy of TEST.DAT with a new name
- (WORK3) in the current directory. But that would require the system to
- issue an error because you can't have a file and a subdirectory with
- the same name in the same directory. So, the system tries to find a
- way to comply with the command without issuing an error message, and it
- does so by copying the file to the WORK3 subdirectory.
-
- In this and other commands, DOS is smart enough to make the
- distinction between directory and file names by reading all elements of
- the command in context and trying to find some way to make the command
- work before issuing an error message. In this regard, i.e. confusing
- file names with directory names, you will make more errors than DOS
- will.
-
- If the command were CD instead of COPY, the system wouldn't have
- to make a decision because the only parameter that CD accepts is a
- directory name and there can't be any confusion with file names. Thus,
- if you're in WORKING and want to change to WORK3, you can enter:
-
- CD WORK3 (relative path)
- or
- CD \WORKING\WORK3 (full path)
-
- Confused? I don't blame you -- and I haven't even mentioned the
- use of two dots to designate the parent directory of a subdirectory. I
- don't use the dots (CD ..). For any command, I always use a \ before a
- directory name and include the full path, rather than take the time to
- figure out what the command requires, where I am and whether I need the
- \ or not. And to change directories, I virtually always use my file
- manager program and thereby avoid having to type in slashes and
- directory names and, again, I suggest you do the same.
-
- In the command COPY \WORKING\TEST.DAT WORK3, how does DOS know if
- TEST.DAT is a directory or a file name? It's not because of the period
- and extension, since you could use that name for a directory. (We'll
- discuss that issue another time.) No, it's because DOS won't let you
- copy a directory, so DOS assumes that TEST.DAT is a file name. You can
- only create a directory using MD.
-
- Here's a side issue. I said that you can only create a directory
- with the MD command. But if you've ever used PKMOVE, a shareware
- utility by Phil Katz, you may know that his utility enables you to move
- a file to a directory that doesn't yet exist. PKMOVE creates the
- directory in this case, a very handy feature. Because of that feature,
- PKFIND does sometimes get confused about whether the last entry in the
- move command is a file or a directory name. In that case, the program
- asks you which it is. This is just one of many examples of astute
- programmers coming up with utilities with features that DOS should have
- had in the first place.
-
- Hard Disk Organizational Steps
-
- Up to this point, we've discussed a lot of preliminary considera-
- tions (and more why's than I had intended) prior to organizing your
- hard disk. Now let's get to the main event: organizing the hard disk.
- I'm going to make a real effort to avoid any why's that aren't abso-
- lutely necessary, stick to the how's, and avoid alternatives whenever
- possible. If you want alternatives, you'll have to find another
- article or read your DOS manual (ugh!).
-
- 1. A Single DOS Partition.
-
- When you configure and format your hard disk, make the entire disk
- a single DOS (bootable) partition. Just follow the instructions that
- come with the hard disk or in your DOS manual and, when the issue
- arises, set it up so that the whole disk is one DOS partition.
-
- Also, if you have a choice, configure your system so that, when
- you turn it on, it automatically boots from the hard disk. (This may
- require you to change a switch setting inside the computer itself --
- check the computer manual.) On my Heath/Zenith HS-148, when I turn on
- the computer, it looks for a disk in drive A and tries to boot from
- there. If there is no disk in drive A, it boots from the hard disk.
- This procedure requires an extra moment or two for booting, but it
- makes it easy to boot from a floppy if I ever have a problem with the
- hard disk.
-
- 2. Create Directories
-
- It's important to limit the content of your root directory to your
- major directory names and certain key files. You shouldn't have more
- than 40-50 entries in your root directory. I have 35 in mine.
- Therefore, prior to creating any directories, it's a good idea to
- review your software collection and determine ahead of time some of the
- major directories you will create. You don't need to think of them all
- -- some will occur to you as you are copying files from your floppies,
- and also you will probably want to change some of them during file
- copying.
-
- If you aren't already in the root directory of your hard disk
- (which I'm going to assume is drive C:), enter CD C:\ and that will put
- you there. Then begin creating your major directories with the command
- MD <directoryname>. For example: MD BAT will create a directory named
- BAT. The following are some examples of major directories to be
- located in the root directory (you may want to give them different
- names):
-
- BAT -- This directory will hold all your batch (.BAT) files.
- More about batch files later.
-
- BIN -- This is the place for all your miscellaneous .COM and
- .EXE programs, including those from your DOS distribu-
- tion disks. (BIN stands for binary, but I think of it
- as a storage bin where I keep all executable files
- that don't apply to any other specific category/direc-
- tory.) Why this directory is a good idea will become
- clear when we discuss the PATH command in your
- Autoexec.Bat file.
-
- CODEWRKS -- This is an example of a specific major directory in my
- root directory. I've done some free-lance programming
- and writing for a small magazine called "CodeWorks".
- The CODEWRKS directory has 3 subdirectories: LETTERS,
- PROGRAMS and TXT-DOC. The content of the first two
- should be self-explanatory. The third contains
- articles and the documentation files for the programs.
-
- COMPILER -- I keep all programs related to the Basic Compiler in
- one directory, except LINK.EXE, which is in BIN.
-
- CORRESP -- All miscellaneous correspondence created on the
- computer could be kept in this directory and its
- subdirectories. I use subdirectories for past years'
- correspondence. Correspondence related to other,
- specific directories would be kept in those other
- directories, for example in a LETTERS subdirectory.
-
- DESKTOPS -- This is where you could keep desktop utilities, using
- subdirectories under this directory for each one (e.g.
- Sidekick, Perks-PC, RHM, etc.).
-
- GAMES -- This is the place for individual game programs. Major
- game systems that include more than one program and/or
- several data files could go in subdirectories or, if
- you use them regularly, in major directories.
-
- MODEMS -- This is where I keep my communications software. The
- program I use most often is in this directory and the
- others are in their own subdirectories.
-
- MY-PROGS -- This is where I keep the programs that I have written.
- Systems of programs (e.g. WIN$BIG) have their own
- subdirectories under this one and they may be further
- subdivided into BAS, EXE and DOC sub-subdirectories.
-
- TEXT -- I use this directory for all non-correspondence text
- files, except text files clearly applicable to other
- specific directories (such as program DOC files).
-
- WORKING -- I use this directory and its subdirectories, WORK1,
- WORK2, WORK3 and WORK4, for all types of work in
- progress, i.e. programming and writing projects.
-
- Those should be enough examples to give you an idea of the types of
- major directories you will want to have in the root directory of your
- hard disk.
-
- 3. Creating and Copying Files for the Directories
-
- You'll find yourself faced with decisions as to where some items
- should go. For example, does the FORD simulator go in a major directo-
- ry or in a subdirectory someplace? Base your decision on two princi-
- ples: limit the major directories to those you will access regularly
- and/or keep the number of major directories as small as possible.
- (FORD is currently a major directory on my hard disk, but it will soon
- be relocated to a subdirectory, probably under GAMES, when the novelty
- wears off.)
-
- If you find that you want to re-organize, before having copied
- files to the directories, remember: RD <directoryname> deletes
- (removes) a directory name, CD <directoryname> creates one, and
- RENDIR.COM and other utilities are available to rename a directory.
-
- Let's start with the root directory's essential files. You should
- have in your root directory: the COMMAND.COM file from the DOS
- distribution disk, an AUTOEXEC.BAT file, a CONFIG.SYS file, and any
- other files with the SYS extension, such as ANSI.SYS and VDISK.SYS,
- from your DOS distribution disks. (IO.SYS and MS-DOS.SYS should
- already be hidden in the root directory from when you formatted the
- hard disk.) It's not necessary to put in the root directory system
- files that you will never use, but I find it just as convenient, given
- the huge amount of space available, to have ALL my software on my hard
- disk. Therefore, all my SYS files are in the root directory.
-
- Here's what to do about Config.Sys and Autoexec.Bat:
-
- CONFIG.SYS
-
- This file can be created with a text editor or by simply entering
- COPY CON CONFIG.SYS and then entering the lines shown below. If
- you use the latter procedure, end the file by entering Ctrl-Z or
- by pressing the F6 key. Then use TYPE CONFIG.SYS to verify that
- it's the way you want it. If you use a text editor, make sure it
- saves the file in straight ASCII, with no special formatting
- codes.
-
- Here's what to put in the CONFIG.SYS file (see your DOS manual for
- an explanation of each item):
-
- BUFFERS=15
- FILES=20
- BREAK=ON
-
- If you want to have a 64K RAM disk, include also:
-
- DEVICE=VDISK.SYS
-
- (If you have the shareware RAMDISK program, which is more flexible
- and easy to use, include DEVICE=RAMDRV.COM instead of the above,
- and include the RAMDRV.COM file in the root directory and the
- RAMDISK.COM file in the BIN directory.)
-
- If you will be using ANSI.SYS regularly (not recommended unless a
- regularly-used application specifies it), include:
-
- DEVICE=ANSI.SYS
-
- If you have DOS version 3, you could also include:
-
- SHELL=C:\COMMAND.COM C:\ /P /E:20
-
- That's an undocumented feature of DOS 3.x that will expand your
- environment to enable you to have more space for a longer PATH, a
- more complicated prompt, and other items included in the environ-
- ment strings. I'm told that it will not work under all types and
- versions of DOS (e.g. PC-DOS 3.0 on an IBM-AT), but it does work
- under Zenith MS-DOS version 3.10 -- provided that it is the LAST
- entry in the Config.Sys file. The 20 can be anything from 10 to
- 64.
-
- AUTOEXEC.BAT
-
- You create this the same way you created the CONFIG.SYS file,
- since both are simply ASCII text files. It will contain all the
- items that you want set up automatically each time you boot.
- Rather than try to explain all the possible items that you could
- include, I'm going to list some of the lines in my Autoexec.Bat
- file and explain each one briefly.
-
- ECHO OFF
- CLS
- ECHO Max. Environment size expanded to 320 bytes via SHELL
- ECHO in CONFIG.SYS file. For default size (160 bytes), delete
- ECHO `SHELL' line and reboot. To change size, edit last para-
- ECHO meter of `SHELL' (20) to be anything from 10 to 64.
- CLS
-
- The ECHO OFF command avoids having all the subsequent
- commands printed on the screen when they are executed. The
- second line clears the screen. The ECHO command may be used
- to print on the screen any comments that you want to see
- while this file is executing. In this case, I used ECHO for
- a note to remind myself how to change environment size. It
- only stays on the screen for a second because of the subse-
- quent CLS, but it's enough for the reminder that I want.
-
- PATH C:\;C:\BAT;C:\BIN;C:\COMPILER;C:\MACE;C:\SPEAK
- CLS
-
- This should be one of the first entries in your Autoexec.Bat
- file. The PATH command tells the system where to look for
- programs if you don't specify where they are when you enter
- the program name. This is very handy and is the reason why I
- said to put all your miscellaneous COM and EXE programs in
- one directory, which I named BIN, and all your batch files in
- a directory named BAT, etc. Once you have all your files
- where you want them and then set up the PATH command proper-
- ly, you can forget where you put everything and the system
- will find things for you. All you have to remember is the
- program name. Proper use of PATH will make your computing
- easier and faster.
-
- The PATH line is easy to compose. All you have to do is
- enter each drive and/or directory in the order that you want
- the system to search them, and separate each entry with a
- semicolon (;).
-
- My path, as shown above, starts with the root directory of
- the hard disk (C:\), followed by the BAT, BIN, COMPILER, MACE
- and SPEAK directories. I included the drive designation
- before each directory name (e.g. C:\BIN) so that the PATH
- will be effective even when I'm in drive A: or B:.
-
- A good example of how this works is when I am writing a Basic
- program and I want to compile it. Regardless of which drive
- or directory I am in, I can simply enter COMPILE <program-
- name> to begin compiling. (I renamed my compiler to COMPILE
- for convenience.) The system then searches for COMPILE in
- each of the locations specified by PATH and finds it,
- together with all other compiler-related files in the
- COMPILER directory (the fourth entry in the PATH command
- line).
-
- Note that I use CLS after each new command in the Autoexec.-
- Bat file to clear the screen of anything displayed by the
- command being executed. It also makes the Autoexec.Bat file
- easier to read when you want to edit it.
-
- MODE ,L
- CLS
-
- The MODE command moves my display one column to the left.
- I've never been able to figure out why virtually all PC-
- compatible displays are skewed to the right of the screen.
- In any case, this solves that problem.
-
- SETCLOCK C
- CLS
-
- This sets the system clock from a battery-driven clock on one
- of my expansion boards.
-
- SNIPPER
- CLS
-
- This is a memory-resident program that permits me to save or
- print any part or all of the screen display at any time.
-
- The best way to handle all of your memory-resident programs
- is to toss them in the BIN, call them in your Autoexec.Bat
- file like this, and let PATH figure out where they are.
-
- SCRDIM 5
- CLS
-
- This memory-resident program clears the screen after 5
- minutes with no activity.
-
- OLIVETTI
- CLS
-
- This is the graphics driver for my not-compatible-with-
- anything printer. The driver is for the Shift-PrtSc function.
-
- TIMEPARK 5
- CLS
-
- This memory-resident utility parks the head of my hard disk
- in a safe place after 5 minutes without activity.
-
- BLINKER
- CLS
-
- This memory-resident utility shows an asterisk in the upper
- right corner of the monitor screen whenever the hard disk is
- accessed. It's the only way I have of knowing when disk
- access occurs because the hard disk is on a board buried
- inside the computer.
-
- PROMPT $_$t $d$_$sDirectory $p$_$_$sCommand --$g $
- CLS
-
- This sets up my customized prompt. Here's what the prompt
- looks like:
-
- 8:20:46.05 Mon 3-07-1988
- Directory C:\WORKING
-
- Command -->
-
- Your DOS manual will explain how to use the PROMPT command,
- but feel free to use mine if you like it. (By the way, it
- only took me a few seconds, using SNIPPER, to capture the
- prompt display at the DOS level, save it in a file and insert
- it (via the text editor) above this paragraph.
-
- COPYSAFE
- CLS
-
- This memory-resident utility warns me if I try to copy a file
- to a location that already has a file with the same name.
-
- CACHE 128 /c /t
- CLS
-
- This is one of the MACE Utilities. It establishes a 128K
- disk cache that speeds up hard disk access significantly.
-
- M
-
- This last entry in my Autoexec.Bat file calls a batch file
- that I created named M.BAT that prints a menu of commands on
- the screen.
-
- That completes my suggestions for what to keep in the root
- directory of your hard disk and what goes in the Autoexec.Bat and
- Config.Sys files. Some of your application programs will require that
- you have additional files in your root directory. That's fine, but
- keep the number of files in the root directory as small as possible.
- In some cases, you will be able to use the SET command (preferably in
- the Autoexec.Bat file) to direct an application program to some
- location other than your root directory for the files needed. Usually,
- the application program will suggest this when it's possible. (See SET
- in your DOS manual.)
-
- As for copying files from your floppies to other directories, the
- procedure is already familiar to you. In most cases, you should be
- able to use wildcards (? and *). Here's a hint: use CD to go to the
- directory to which you are about to copy files. Then, if you're going
- to copy all the files from a disk in drive A:, you can just enter:
-
- COPY A:*.*
-
- Note that you don't have to specify the target drive or directory
- because the current drive and directory are the defaults for the COPY
- command. (Ain't DOS grand?!)
-
- 4. Items for the BAT Directory
-
- Batch files can be a tremendous help, especially when they're all
- together in one directory where they can be found by the system via the
- PATH established in the Autoexec.Bat file. Batch files save a whole
- lot of typing (not to mention thinking and remembering).
-
- For programs that you use regularly, it's a simple matter to
- rename them to something easier to remember. For example, I renamed my
- text editor so that all I have to enter is E. (It's in the BIN and
- PATH tells the system to look for it there.) But some programs can't be
- renamed for a variety of reasons and others may be located in a
- directory that's not part of your PATH. (Skipping the why's here,
- Boss.) You can still rename such programs, and/or avoid having to enter
- the path along with the program name, by creating a batch file, giving
- it the name you want to give the program, and including in the batch
- file the path and name of the program. Batch files are simply ASCII
- text files with the .BAT extension. They are created the same way that
- I described above for the Autoexec.Bat and Config.Sys files.
-
- For example, suppose that you have a game named FUN$-6PQ.EXE in
- the WEIRD subdirectory of your GAMES directory, and assume that GAMES
- is not listed in the PATH command in your Autoexec.Bat file. If you
- play that game often, you could make your life simpler by creating a
- batch file named FUN.BAT with the following lines:
-
- ECHO OFF
- CLS
- \GAMES\WEIRD\FUN$-6PQ.EXE
-
- Then you could play the game from any directory by just entering FUN.
-
- To give you some ideas, the following are some of the batch files
- and their contents from my BAT directory.
-
- M.BAT
-
- ECHO OFF
- CLS
- CD \
- TYPE MENU
-
- ------------------------------------------------------------
- Note: M is the last entry in my Autoexec.Bat file and the
- result is that, when the system finishes, I have a
- command menu on the screen. Here's what the MENU text
- file contains:
-
- Custom Commands Purposes (Enter M for this Menu)
- ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- B Load GW-BASIC Interpreter
- E Load PTP Text Editor
- CB Split-screen Comm. for CIS CB @ 1200 baud
- EQ Run Schwab Equalizer stock portfolio program
- FM Run File Manager Program
- FY Run Fontasy fonts and graphics program
- MK Load Masterkey Utilities (includes Unerase)
- COMM Load Access Modem Communications Program
- GAMES Display Games Menu
- CLOCK Display World-Time Clock
- BACKDAY Backup New/Updated Files to Drive B
- DIRNOTES Display or write comments about each file
- WHEREIS fname Find Named File
- SPELL <filename> Run Spelling-Checker on named file
- CIS300 or CIS1200 Connect to CompuServe at 300 or 1200 Baud
-
- This is also a good example of using one batch file to
- call another batch file. For example, I end many of
- my batch files with M, with the result that everything
- ends in the root directory with the menu displayed.
- ------------------------------------------------------------
-
- BACKALL.BAT
-
- ECHO OFF
- CLS
- CD \
- ECHO Hard Disk Full-Backup Routine to Drive A:
- ECHO ...
- BACKUP *.* A:/E:IO.SYS+MSDOS.SYS+COMMAND.COM/G/N/R
- CLS
-
- ------------------------------------------------------------
-
- BACKDAY.BAT
-
- ECHO OFF
- CLS
- C:
- CD \
- ECHO DAILY Hard Disk Backup Routine
- ECHO Copying to Drive B all files dated today ...
- BACKUP C:*.* B:/A/G/N/R/T/Q
- ECHO Copying to Drive B all files changed since last backup ...
- BACKUP C:*.* B:/A/G/N/R/W/Q
- M
-
- ------------------------------------------------------------
-
- LINK.BAT
-
- C:\BIN\LINK %1,,NUL.MAP,C:\COMPILER\BRUN20G.LIB;
-
- ------------------------------------------------------------
-
- TAMPABBS.BAT
-
- ECHO OFF
- CLS
- CD \MODEMS
- ACCESS2 TAMPABBS
- CD \
- CLS
- M
-
- ------------------------------------------------------------
-
- CLOSE.BAT
-
- ECHO OFF
- CLS
- ECHO Squeezing directories (eliminating deleted files space) ...
- SQZD C:
- CLS
- CD \
- ECHO Enter PARK and press Return ...
-
- ------------------------------------------------------------
- Note: This is the batch file I call when I finish for the
- day, after having performed the daily backup. SQZD is
- one of the MACE utilities.
- ------------------------------------------------------------
-
- 5. Backing Up the Hard Disk
-
- Once you've completed the organization of your hard disk with
- directories and subdirectories full of files, the final step is to make
- a full backup copy on floppies. DOS has a BACKUP program for that
- purpose and there are several shareware programs that will do the job
- and may do it better.
-
- Before doing the backup, however, consider this: it takes a long
- time and, the more files you have, the longer it takes. Why not reduce
- that time by reducing the number of files and, at the same time,
- providing more free space on the hard disk? How? Use an archive
- utility (PKX35A35.ARC is available on most BBS's) to compress and
- combine files that you seldom if ever use. For example, DOS has 12
- KEYBxxx.COM files that you will rarely use. Archive them into KEYB.ARC
- with a space savings of 32% and a reduction of 11 in the number of
- files that have to be backed up. I'm sure you can find other examples
- for this type of time and space savings.
-
- That's about all I have to say on the subject of getting organized
- with a hard disk. I hope you found it useful. For some ideas as to
- what types of programs and utilities it might be convenient to have on
- your hard disk, in addition to those mentioned above, read my software
- reviews in other issues of "Skip's Computer Miscellanea" and in "Skip's
- Download Reviews" available on this and other BBS's.
-
- *****-30-*****