This command controls Windows DriveSpace at the command line, and can be used with either DblSpace or DrvSpace drives. These command switches are maintained for use in batch files and for compatibility with the compression utilities provided in MS-DOS version 6 and higher. Each switch performs the indicated operation, without asking for any additional input before beginning.
Additionally, the /interactive switch can be added to any command line to have DriveSpace ask for any missing parameters, and the /noprompt switch can be added to any syntax except the /info and /settings command-lines. The /noprompt switch prevents any confirmation dialog boxes from appearing (except for error messages). Notice that there is no way to prevent error messages from being displayed.
When you run DriveSpace without command-line arguments, the DriveSpace Manager appears, with menu commands for selecting the operations to perform. For more information about this utility, see Chapter 20, "Disks and File Systems."
Syntax
drvspace /compress d: [/size=n| /reserve=n] [/new=e:]
drvspace /create d: [/size=n | /reserve=n] [/new=e:] [/cvf=nnn]
drvspace /delete d:\d??space.nnn
drvspace /format d:\d??space.nnn
drvspace /host=e: d:
drvspace [/info] d:
drvspace /mount {[=nnn] d: | d:\d??space.nnn} [/new=e:]
drvspace /move d: /new=e:
drvspace /ratio[=n] d:
drvspace /settings
drvspace /size[=n| /reserve=n] d:
drvspace /uncompress d:
drvspace /unmount d:
Parameters
d??space.nnn
The filename of the hidden compressed volume file on the host drive, which can be either DRVSPACE.nnn or DBLSPACE.nnn, where nnn represents the actual filename extension.
The following sections provide details for these switches.
If you add switches or parameters to the drvspace command, the operating system carries out the requested task without starting the DriveSpace program. The command syntax differs from task to task, as summarized in the following list.
Action | Command |
Compress a hard disk drive or floppy disk. | drvspace /compress |
Create a new compressed drive in the free space on an existing drive. | drvspace /create |
Delete a compressed drive. | drvspace /delete |
Format a compressed drive. | drvspace /format |
Display information about a compressed drive. | drvspace /info |
Mount a compressed volume file (CVF). When DriveSpace mounts a CVF, it assigns it a drive letter; you can then use the files that CVF contains. | drvspace /mount |
Change estimated compression ratio of a compressed drive. | drvspace /ratio |
Change the size of a compressed drive. | drvspace /size |
Uncompress a compressed drive. | drvspace /uncompress |
Unmount a compressed drive. | drvspace /unmount |
Notes on Drvspace
Fixing problems with drives compressed using DriveSpace.
DriveSpace no longer provides a Chkdsk command as in earlier versions. Instead, Windows 95 includes the new ScanDisk program, a full-featured disk analysis and repair utility. ScanDisk can check and repair both uncompressed drives and DriveSpace or DoubleSpace drives. It can even check and repair unmounted DriveSpace or DoubleSpace compressed volume files. For more information, see "ScanDisk" later in this appendix.
DBLSPACE.BIN, DRVSPACE.BIN, and DRVSPACE.SYS.
DBLSPACE.BIN or DRVSPACE.BIN is the part of the system that provides access to the compressed drives. When you start the computer, the operating system loads D??SPACE.BIN along with other operating system functions, before carrying out the commands in CONFIG.SYS and AUTOEXEC.BAT. D??SPACE.BIN initially loads in conventional memory, since it loads before device drivers that provide access to upper memory. Normally, if the hard disk drive has been compressed using DriveSpace, D??SPACE.BIN is loaded even if you press F8 and choose an alternate startup option.
DRVSPACX.VXD is the protected-mode driver for DriveSpace. This driver takes over from the real-mode D??SPACE.BIN driver when Windows 95 switches to protected mode. The real-mode driver is required for starting the computer, but after the system switches to protected mode, DRVSPACX ensures that you have 32-bit, protected-mode performance, and the memory used by the real-mode driver is reclaimed.
The DBLSPACE.SYS device driver does not provide access to compressed drives; instead it determines the final location of D??SPACE.BIN in memory. When loaded with a device command, the DBLSPACE.SYS device driver moves D??SPACE.BIN from the top to the bottom of conventional memory. When loaded with a devicehigh command, DBLSPACE.SYS moves D??SPACE.BIN from conventional to upper memory, if available. Whenever possible, DBLSPACE.SYS moves a portion of D??SPACE.BIN into the HMA.
How DriveSpace assigns drive letters.
When you compress a drive using DriveSpace, it creates a new drive and assigns a drive letter to that drive. DriveSpace skips the first four available drive letters and assigns the next available drive letter to the new drive. For example, if the computer has only drives A, B, and C, DriveSpace skips letters D, E, F, and G, and assigns drive letter H to the new drive.
When assigning letters to additional drives (for example, if you compress another drive), DriveSpace works backwards from the first drive letter it assigned. In the example above, DriveSpace would next assign the letter G.
DriveSpace attempts to avoid drive-letter conflicts with drives created by fdisk, RAMDrive, networks, or other installable device drivers that assign drive letters. However, if a drive-letter conflict does occur, DriveSpace resolves the conflict by reassigning its drive letters.
Compresses the files and free space on an existing hard disk drive, floppy disk, or other removable media. Compressing an existing drive makes more space available on that drive.
Note
DriveSpace cannot compress a drive that's completely full. To compress the startup hard disk drive, the drive must contain at least 2 MB of free space. Other hard disk drives and floppy disks must contain at least 768K of free space. (DriveSpace cannot compress 360K floppy disks.)
Syntax
drvspace /compress drive1: [/new=drive2:] [/reserve=size]
Parameters
drive1:
Specifies the existing drive you want to compress.
Switches
/compress
Compresses the hard disk drive or floppy disk specified by the drive parameter. This switch can be abbreviated to /com.
/new=drive2:
Specifies the drive letter for the uncompressed (host) drive. After DriveSpace compresses an existing drive, the system will include both the existing drive (now compressed) and a new uncompressed drive. If you omit the /new switch, DriveSpace assigns the next available drive letter to the new drive.
/reserve=size
Specifies how many megabytes of space to leave uncompressed. Because some files do not work properly when stored on a compressed drive, you may want to reserve some uncompressed space. The uncompressed space will be located on the new uncompressed drive. This switch can be abbreviated to /reser.
Drvspace /Compress Examples
To compress drive D, type the following command:
drvspace /compress d:
On drives larger than 256 MB, more space will be left on the host (because D??Space drives cannot be larger than 512 MB). Because this command does not specify how much space to leave uncompressed, DriveSpace leaves 2 MB of uncompressed space (the default). Because the command does not specify a drive letter for the uncompressed drive, DriveSpace assigns the next available drive letter to the new uncompressed drive (the host drive).
To direct DriveSpace to compress drive E, assign the drive letter F to the new uncompressed drive (the host drive), and leave 4 MB of uncompressed space on drive F, type the following command:
drvspace /compress e: /new=f: /reserve=4
Creates a new compressed drive by using free space on an uncompressed drive. The new compressed drive will provide more storage capacity than the amount of space it uses.
Syntax
drvspace /create drive1: [/new=drive2:] [/size=size | /reserve=size] [/cvf=nnn]
Parameters
drive1:
Specifies the uncompressed drive that contains the space you want to use to create the new drive.
Switches
/create
Creates a new compressed drive by using free space on the uncompressed drive specified by drive1. This switch can be abbreviated to /cr.
/new=drive2:
Specifies the drive letter for the new compressed drive. The /new switch is optional; if you omit it, DriveSpace assigns the next available drive letter to the new drive.
/reserve=size
Specifies how many megabytes of free space DriveSpace should leave on the uncompressed drive. To make the compressed drive as large as possible, specify a size of 0.
You can include either the /reserve switch or the /size switch, but not both. If you omit both switches, DriveSpace uses all but 2 MB of free space. The /reserve switch can be abbreviated as /reser.
/size=size
Specifies the total size, in megabytes, of the compressed volume file. (This is the amount of space on the uncompressed drive that you want to allocate to the compressed drive.) You can include either the /reserve switch or the /size switch, but not both.
/cvf=nnn
Reports extension of the CVF file.
Drvspace /Create Examples
To create a new compressed drive that uses all available space on uncompressed drive E, type the following command:
drvspace /create e: /reserve=0
To create a new compressed drive by using 10 MB of space on uncompressed drive E, type the following command:
drvspace /create e: /size=10
To create a new compressed drive by using space on uncompressed drive D, and to direct DriveSpace to leave 2.75 MB of free space on drive D, type the following command:
drvspace /create d: /reserve=2.75
The following command creates a new compressed drive by using all but 2 MB of the space on drive D:
drvspace /create d:
Because the command includes neither the /reserve switch nor the /size switch, DriveSpace uses the default value for the /reserve switch and leaves 2 MB of space on drive D.
Deletes the selected compressed drive and erases the associated compressed volume file.
Caution Deleting a compressed drive erases the entire drive and all the files it contains.
Syntax
drvspace /delete d:\d??space.###
Parameters
d:\d??space.###
Specifies the drive you want to delete. (DriveSpace will not allow you to delete any drive containing open files, including the drive containing Windows 95.)
Switch
/delete
Deletes the specified drive. This switch can be abbreviated as /del.
Drvspace /Delete Example
The following command directs DriveSpace to delete the compressed volume for drive C:
drvspace /delete h:\dblspace.###
DriveSpace then deletes the compressed volume file for drive C. This completely erases the compressed drive and all the files it contains.
Formats the selected compressed drive.
Caution Formatting a compressed drive deletes all the files it contains. You cannot unformat a drive that has been formatted by using drvspace /format.
Syntax
drvspace /format d:\d??space.###
Parameters
d:\d??space.###
Specifies the drive you want to format. (DriveSpace will not allow you to format any drive containing open files, including the drive containing Windows 95.)
Switch
/format
Directs DriveSpace to format the specified compressed drive. This switch can be abbreviated as /f.
Drvspace /Format Example
The following command directs DriveSpace to format compressed drive E:
drvspace /format h:\dblspace.###
DriveSpace then formats compressed drive E, which completely erases all the files on it.
Displays information about the selected drive's free and used space, the name of its compressed volume file, and its actual and estimated compression ratios. You can use this command while Windows is running.
Syntax
drvspace [/info] | [drive:]
Parameters
drive:
Specifies the compressed drive about which you want information. If you don't specify a drive letter, DriveSpace displays information about the current drive.
Switch
/info
Directs DriveSpace to display information about the selected drive. This switch is optional and can be omitted as long as you specify a drive letter.
Drvspace /Info Examples
The following command displays information about the current drive:
drvspace /info
The following command displays information about drive C:
drvspace /info c:
The following command displays information about drive E:
drvspace e:
Establishes a connection between a compressed volume file (CVF) and a drive letter so that you can use the files the CVF contains. DriveSpace usually mounts CVFs automatically. You need to mount a CVF only if you previously unmounted it.
Syntax
drvspace /mount[=nnn] drive1: [/new=drive2:]
drvspace /mount d:\d??space.### [/new=drive2:]
Parameters
drive1:
Specifies the drive that contains the compressed volume file you want to mount. You must specify a drive letter.
Switches
/mount=nnn
Directs DriveSpace to mount the compressed volume file with the filename extension specified by the nnn parameter. For example, to mount a CVF named DBLSPACE.001, you would specify /mount=001. If you omit the nnn parameter, DriveSpace attempts to mount the compressed volume file named DBLSPACE.000.
/new=drive2:
Specifies the drive letter to assign to the new drive. This switch is optional; if you don't specify a drive letter, DriveSpace assigns the new drive the next available drive letter.
Drvspace /Mount Examples
To mount a compressed floppy disk in drive A, type the following:
drvspace /mount a:
To mount the compressed volume file DBLSPACE.001 located on uncompressed drive D, type the following:
drvspace /mount=001 d:
Changes the estimated compression ratio of the selected drive. DriveSpace uses this ratio to estimate how much free space the drive contains. You might want to change the estimated compression ratio if you plan to store new files with a compression ratio that differs greatly from the current ratio.
Syntax
drvspace /ratio[=r.r] [drive:]
Parameters
drive:
Specifies the drive for which you want to change the estimated compression ratio. If you do not specify a drive, DriveSpace changes the estimated compression ratio for the current drive.
Switch
/ratio=r.r
Changes the estimated compression ratio of the specified drive. To change the ratio to a specific number, specify the ratio you want. You can specify a ratio from 1.0 to 16.0. However, not all drives can accept values in this entire range. If you don't specify a ratio, DriveSpace sets the drive's estimated compression ratio to the average actual compression ratio for all the files currently on the drive. This switch can be abbreviated as /ra.
Drvspace /Ratio Examples
To change the estimated compression ratio of the current drive to match that drive's actual compression ratio, type the following command:
drvspace /ratio
To change the estimated compression ratio for drive D so that it is 3.2 to 1, type the following:
drvspace /ratio=3.2 d:
To change the estimated compression ratio of the current drive to 6 to 1, type the following:
drvspace /ratio=6
Enlarges or reduces the size of a compressed drive. You might want to enlarge a compressed drive if its host drive contains plenty of free space. You might want to reduce its size if you need more free space on the host drive.
Syntax
drvspace /size[=size1 | /reserve=size2] drive:
Parameters
drive:
Specifies the drive you want to resize.
Switches
/size=size1
Changes the size of the specified drive. You can specify the new size of the drive by using the size1 parameter. The size of the drive is the number of megabytes of space that the drive's compressed volume file uses on the uncompressed (host) drive.
You can specify the drive's new size by using either the size1 parameter or the /reserve switch, but not both. If you include neither the size1 parameter nor the /reserve switch, DriveSpace makes the drive as small as possible.
/reserve=size2
Specifies how many megabytes of free space you want the uncompressed (host) drive to contain after DriveSpace resizes the drive. The /reserve switch can be abbreviated as /reser.
You can specify the drive's new size by using either the /reserve switch or the size1 parameter of the /size switch, but not both. If you include neither the /reserve switch nor the size1 parameter, DriveSpace makes the drive as small as possible.
Drvspace /Size Examples
To change the size of drive C so that its compressed volume file uses 60.5 MB of space on drive D, type the following command:
drvspace /size=60.5 c:
To change the size of drive E so that its host drive, drive D, contains 20 MB of free uncompressed space, type the following command:
drvspace /size /reserve=20 e:
To change the size of drive C so that it is as large as possible, type the following command:
drvspace /size /reserve=0 c:
Uncompresses a drive that was compressed by using DriveSpace.
Syntax
drvspace /uncompress drive:
Parameter
drive:
Specifies the drive you want to uncompress.
Switch
/uncompress
Uncompresses the specified drive.
Notes on Drvspace /Uncompress
Backing up before uncompressing.
Before uncompressing the drive, you should back up the files it contains. If you include the /interactive switch, DriveSpace will prompt for this.
Invalid pathnames after uncompressing.
When you uncompress a drive, DriveSpace either changes that drive's letter or the letter of its host drive (depending on how the compressed drive was originally created). DriveSpace shows how the drive letters will change when it uncompresses the drive. Some programs have settings that include explicit pathnames and drive letters. If a program's settings specify a drive that is no longer valid after uncompressing, the program will probably display an error message or be unable to find one of its components or data files. In that case, you need to correct the drive letter specified by that setting.
Disk space.
You can uncompress a drive only if the data it contains will fit on the host drive. If you use the drvspace /uncompress command, and DriveSpace indicates the drive will not have enough free disk space, delete unnecessary files or move them to another drive.
Duplicate filenames on compressed and host drives.
If the root directories of the compressed and host drives contain files or directories with identical names, DriveSpace cannot uncompress the compressed drive. If this happens, DriveSpace displays an error message. Remove or rename one copy of each file, and then try uncompressing the drive again.
Uninstalling DriveSpace.
When you uncompress the last mounted compressed drive, DriveSpace first uncompresses the drive, and then prompts you to remove the DrvSpace driver from memory.
Drvspace /Uncompress Example
To uncompress drive E, type the following command:
drvspace /uncompress e:
Breaks the connection between the selected drive's compressed volume file and its drive letter. Unmounting a drive makes it temporarily unavailable.
You cannot unmount a drive containing open files, including the drive containing Windows 95.
Syntax
drvspace /unmount [drive:]
Parameters
drive:
Specifies the drive you want to unmount. This parameter is optional; if you omit it, DriveSpace unmounts the current drive.
Switch
/unmount
Unmounts the specified compressed drive.
Drvspace /Unmount Example
To unmount compressed drive E, type the following command:
drvspace /unmount e: