This article was previously published under Q80751
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Most of the Microsoft MS-DOS operating system files are compressed on disk.The MS-DOS Setup program decompresses these files when you install MS-DOS.
The MS-DOS EXPAND command is available to decompress and copy filesindividually. EXPAND is described in the "Microsoft MS-DOS User's Guide andReference" for versions 5.x and in online help for MS-DOS versions 6.0 andlater.
The following increased functionality was added to the EXPAND commandbeginning with MS-DOS version 5.0a:
Displays two status messages
Allows multiple source file arguments
Has interactive user input
Wildcard capability for the last character of an extension
When you decompress a file in MS-DOS 5.0a or later, EXPAND prints twostatus messages: one that details the full path of the source and targetfiles, and one that details how many files were expanded.
In MS-DOS 5.0, if you enter the command EXPAND with no parameters, itdisplays the same help information as if you had entered the command EXPAND/?. However, in versions 5.0a and later, EXPAND is interactive. It promptsfor the name of the compressed file and the name it should have in expandedform. For example:
c:\>EXPAND Type the location and name of the compressed file you want to expand. (Example: A:\EGA.SY_) Compressed file: a:\himem.sy_ Type the location and/or name you want to give the expanded file. (Example: C:\DOS\EGA.SYS) Expanded file: c:\dos\himem.sys A:\HIMEM.SY_ -> C:\DOS\HIMEM.SYS 1 file expanded
Although the MS-DOS asterisk (*) and question mark (?) wildcards are notsupported by the EXPAND command, a limited but useful form of wildcards hasbeen introduced. If the specified source file does not exist, EXPANDattempts to find a file with the same name and extension, except that itchanges the last character of the extension to an underscore (_). Forexample, if the file A:\EXAMPLE.BIN does not exist, the command
expand a:\example.bi_ c:\example.bin
has the same effect as:
expand a:\example.bin c:\example.bin
expand a:\example.bin c:\
If the target file is not specified, the EXPAND command in versions 5.0aand later uses the same name as the source.
Multiple source parameters are allowed. If multiple source parameters areused, the target must specify a single drive or directory. You can stilluse the following commands to re-expand the entire Shell for a VGA systemin MS-DOS 5.0: