DOS Expand Command - E X P A N D

The files on your DOS installation or upgrade diskettes are stored in a special compressed format. If you followed Microsoft's automatic upgrade process, these files would automatically be expanded as they were loaded to your hard drive.

Occasionally, you may need to transfer an individual DOS file from the upgrade diskettes to your hard drive. For example, if you accidently deleted a DOS file from your hard disk drive, you would need to expand the file from the DOS diskette to your hard drive. The Expand command allows you to do so.

Pattern

EXPAND [drive:][path]filename [...] destination

Parameters

The [drive:][path]filename [...] parameters indicate the name and location of the DOS file(s) to be expanded. Compressed DOS files are distinguished by an underscore in their filename extension (.CO_, .EX_ and .SY_).

The destination parameter specifies the location and/or name that the compressed file(s) should be expanded to. If you are expanding several files, destination must be a directory; it cannot be a filename. If you are expanding just one destination, it can be either a filename or a directory.

If destination is a directory, the expanded file's name will be identical to its compressed cousin. If that filename's extension ends in an underscore, you must change it to the proper name as follows, before accessing that file.

Compressed
Filename Extension
Destination
Filename Extension
BA_ BAS
CO_ COM
CP_ CPI
EX_ EXE
GR_ GRB
HL_ HLP
IN_ INI
SY_ SYS
VI_ VID

Notes

Don't use the DOS wildcard characters * and ? with the Expand command.

The Copy command should not be used to transfer compressed DOS files from the DOS diskettes to the hard drive. Since COPY does not expand compressed DOS files, they will be unusable by DOS.

Example

To retrieve the compressed DOS file DISPLAY.SY_ from the DOS upgrade diskette in drive A: to the C:\DOS directory, implement EXPAND as follows:

EXPAND A:\DISPLAY.SY_ C:\DOS\DISPLAY.SYS