1. Home
  2. Computing & Technology
  3. PC Support

Expand

By , About.com Guide

What Is the Expand Command?:

The expand command is a Recovery Console command used to extract a single file or a group of files from a compressed file.

The expand command is typically used to replace damaged files in the operating system by extracting working copies of files from the original compressed files on the Windows XP or Windows 2000 CD.

Expand Command Syntax:

expand source [/f:filespec] [destination] [/d] [/y]

source = This is the location of the compressed file. For example, this would be the location of a file on the Windows CD.

/f:filespec = This is the name of the file that you want to extract from the source file. If the source only contains one file, this option isn't necessary.

destination = This is the directory where the source file(s) should be copied to.

/d = This option lists the files contained in source but does not extract them.

/y = This option will prevent the expand command from informing you if you are copying over files in this process.

Expand Command Examples:
expand d:\i386\hal.dl_ c:\windows\system32 /y

In the above example, a compressed version of the hal.dll file (hal.dl_) is extracted (as hal.dll) to the c:\windows\system32 directory.

The /y option prevents Windows from asking us if we would like to copy over the existing hal.dll file located in the c:\windows\system32 directory, if there happens to be an existing copy there already.

expand /d d:\i386\driver.cab

In this example, all of the files contained in the compressed file driver.cab are displayed on screen. No files are actually extracted to the computer.

Expand Command Availability:

The expand command is only available from within the Recovery Console in Windows 2000 and Windows XP.

Expand Related Commands:

The following commands are related to the expand command:

Fixboot | Fixmbr | Diskpart

Explore PC Support
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. PC Support
  4. Glossary / Terms
  5. E
  6. Expand - Expand Command Details>

©2009 About.com, a part of The New York Times Company.

All rights reserved.