This is only a preview of the October 1993 issue of Silicon Chip. You can view 36 of the 104 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Articles in this series:
Items relevant to "Courtesy Light Switch-Off Timer For Cars":
Articles in this series:
Items relevant to "Stereo Preamplifier With IR Remote Control; Pt.2":
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
|
COMPUTER BITS
BY DARREN YATES
Using DOS 6.0’s DoubleSpace
If you’re having problems with hard disc space,
then you should take a long look at DoubleSpace
in DOS 6.0. It will compress existing drives as
well as create compressed drives inside your
current setup.
No matter how big your hard disc
is, you never seem to have enough
space on it. One reason: computer
programs are getting bigger. Take a
look at the evolution of MS-DOS, for
example. Version 3.3 occupied 500Kb
or so, while version 6.0 takes 6-7Mb.
But that’s not large compared to some
programs. The current version of
CorelDraw requires upwards of 30Mb
of disc space!
To alleviate space problems, many
computer users rely on file compression programs such as LHARC and
PKZIP. These are great little programs
which can compress most files down
drive – you simply save your files to
that disc and they are automatically
compressed. It can even compress
some of your files so that they are 16
times smaller than the original size.
The obvious benefit is that it dramatically increases disc space. And
although it will marginally slow things
down, as files compress and decompress, it is still many times faster and
re
quires less work than LHARC or
PKZIP.
Running DoubleSpace
To get DoubleSpace up and running,
simply type DBLSPACE<return> at
DoubleSpace can create a compressed drive
which, for all the world, looks & acts just like an
ordinary drive – you simply save your files to that
disc & they are automatically compressed.
to a fraction of their former selves.
However, they do require some effort
on your part in order to compress files
and delete the originals. To recover
the original files, you then have to run
the compression program in reverse
to decompress the files back to their
original size.
DOS 6.0’s DoubleSpace goes a step
further by making this process automatic. DoubleSpace can create a compressed drive which, for all the world,
looks and acts just like an ordinary
34 Silicon Chip
your C:\DOS prompt. Once the program appears, you will be given the
choice of running two methods of
setup – express or custom.
Express setup automatically selects
all files on drive C: to be compressed
and sets the compression ratio as well.
The custom option allows you to set
the size of the drive and specify a free
space ratio from 2:1 to 16:1.
In addition to hard disc compression, DoubleSpace also has the ability
to compress other drives that MS-DOS
can access, except CD-ROMs and the
like. This means that you might want
to compress a 1.44Mb floppy, for example, to transfer files from one machine
to another without having to compress
part of the C: drive as well.
Fortunately, there is a way around
Microsoft’s statement that “once a
drive has been compressed it can’t
be decompressed”. The method is as
follows:
(1) Use the Custom Setup and select
the option for creating a new compressed drive. This new drive will
come from the remaining space left
on your existing C: drive.
(2) Follow the options through but
don’t change any of the defaults to
create the new compressed drive. This
will be designated as drive H:.
(3) Once that’s completed, exit out
of DoubleSpace.
DoubleSpace is now installed on
the hard drive and can be accessed
as a normal program. To retrieve your
original disc space and remove the
compressed drive H:, the steps are as
follows:
(4) Return to the root directory of
your C: drive – you will find that you
have around 2.5Mb of memory left.
This is determined by the custom
setup procedure in DoubleSpace.
( 5 ) Ty p e AT T R I B - S - H - R
DBLSPACE.*[enter], then DIR[enter].
You will find two new files with
the DBLSPACE prefix. One of these,
DBLSPACE.001, will be approximately
the same size as the space originally
remaining on your hard disc minus
the 2.5Mb now remaining.
(6) The ATTRIB statement allows
this file to be seen and, more importantly, to be deleted. If you now type
DEL DBLSPACE.001[enter], you’ll find
that you’re just about back to the same
space you started with. Now go back
into DoubleSpace and check that the
drive is no longer there. This should
be apparent on the opening screen.
It will either show that there is no
compressed drive or that it still thinks
drive H: exists.
If the latter is the case, just select
the UNMOUNT option from the
DRIVE menu. This will remove it from
DoubleSpace’s setup files and you can
now compress other drives without
having your hard disc disturbed.
User environment
Once you start using DoubleSpace,
you’ll find it an easy program to
work with. As with all Microsoft
software these days, it comes with a
context-sensitive help reference that
is quite thorough and contains information that doesn’t appear in the DOS
6 handbook.
If at any point you get stuck, simply press F1 and DoubleSpace will
give you information on your current
position.
There are four main options displayed across the top menu bar:
DRIVE, COMPRESS, TOOLS and HELP.
This second help option allows you
to look up anything you want at any
particular time, instead of being context sensitive.
The DRIVE menu contains the main
disc-based commands which include
MOUNT and UNMOUNT. These are
the commands for loading and unloading a compressed disc into your
current system. You can’t just load a
compressed floppy into your B: drive
and expect it to work immediately;
you have to use the MOUNT and UNMOUNT commands to tell DOS that the
current floppy is either a compressed
or normal disc.
Other commands included are
CHANGE RATIO and CHANGE SIZE.
The change ratio command allows
you to modify the estimated disc
space displayed. When a drive is
initially compressed, the amount of
free space is only an estimate. Because not all files compress equally,
it is difficult to forecast how much
compressed space remains on a drive.
Once you begin using the drive, the
free space shown will be based on the
average compression ratio of all files
stored so far.
You can check the average compression ratio for all files in a directory by
typing DIR/C[enter]. This will also
give the compression ratios on each
file as well.
Note that the CHANGE RATIO command changes the estimated disc space
remaining but not the compression
ratio of any stored data. When DOS
shows how much space remains on
a compressed disc, it is an estimate
based on a theoretical compression
ratio of 2:1. You can increase this up
to 16:1, which is the limit of the compression range.
In practice, it really depends on
the files the disc will contain. If
you’re only copying text files, which
compress up much tighter than 2
to 1, changing the ratio make sense
but if the disc contains .LZH, .EXE
or .BIN files, which don’t compress
anywhere near 16:1, then it would
be pointless as the free space shown
will be inaccurate.
The CHANGE SIZE command allows you to change just how much of
a drive is compressed and how much
is normal storage space. This can be
very handy indeed. Since Double
Programming Tip
This tiny batch file, A_.BAT,
will automatically mount your
compressed floppy disc and get
you into the A: drive. For other
drives, simply change the drive
letter. Just type A_[enter] and
it does the rest. The <at> symbol
stops unnecessary messages
appearing on the screen:
<at>dblspace/mount a:
<at>a:
part of a drive that you already have
in use. The Create New Drive option
allows you to create a new drive from
an existing hard disc which has its
own designation letter; eg; you can
create a new drive G: from space left
over on your C: drive. This is handy
if you wish to separate users or programs, or both.
Tools menu
In a way, DoubleSpace is a disc
operating system within another
and this is shown up in the way that
DoubleSpace looks after its own compressed drive. An example of this is
the Tools Menu. This contains two
options: defragmentation and error
removal.
The defragmentation option rewrites all file fragments into consecutive sections of disc. This speeds up
file loading as well as reducing disc
wear and tear, since the drive only
has to look at one place on the drive
to find the complete file.
Error removal is achieved using
a modified version of the CHKDSK
program. This unmounts the disc so
that it appears as an ordinary disc and
runs a CHKDSK test looking for errors
such as bad sectors or lost files. Once
found, they are then removed.
There aren’t many commands in
DoubleSpace and this makes running
a compressed disc drive system easier
than you might have thought. If you
find this a bit cumbersome, then you’ll
be pleased to know that DoubleSpace
is also operable from the DOS command line.
DOS commands
Space always gives compressed
drives a new letter designation, you
could quite easily put program .EXE
files on the normal section of the disc
and then place work files such as text
and database files on the compressed
section.
This will give you an optimum arrangement between maximum storage
and speed.
Compress menu
Moving across to the Compress
menu, this gives you the option of
compressing an existing drive or creating a new compressed drive. Now
you might think this sounds like the
same thing but there is a difference.
The Compress Existing Drive command allows you to compress all or
By typing DBLSPACE /?[enter],
DoubleSpace will give you the list of
switches which can be used to achieve
all of the above options directly from
the DOS prompt rather than having to
access the main user interface. This
is ideal for batch file programming or
for using DoubleSpace in your own
programs. And by chaining in the
DOS commands, you can access the
features on DoubleSpace quickly and
easily (see the programming tip in this
column).
So that’s it. You may have dismissed
DoubleSpace as just a sales gimmick
the boffins in the computer stores use
but it is a definite winner and well
worth using if a hard disc upgrade is
beyond your budget. For the money,
SC
it’s a bargain.
October 1993 35
|