Expand Command Examples Options Switches and More
Expand Command (Examples, Options, Switches, and More) GA S REGULAR Menu Lifewire Tech for Humans Newsletter! Search Close GO Software & Apps > Windows
This 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 operating system's CD.
The availability of certain expand command switches and other command syntax may differ from operating system to operating system. See How to Read Command Syntax if you're not sure how to read the syntax above or in the table below. Expand Command Options Item Description /r Renames expanded files. source Location of the compressed file. For example, this would be the location of a file on the Windows CD. destination The directory where the source file(s) should be copied to. Can consist of a drive letter and colon, a directory name, a file name, or a combination of these. If source consists of multiple files and you don't specify /r, destination must be a directory. /i Renames expanded files but ignores the directory structure. Applies to Windows Server 2008 R2 and Windows 7. /d Lists the files contained in the source but doesn't extract them. /f:filespec 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. /y Prevents the command from informing you if you are copying over files in this process.
Expand Command
Expand command examples, options, switches, and more
By Tim Fisher Tim Fisher Senior Vice President & Group General Manager, Tech & Sustainability Emporia State University Tim Fisher has more than 30 years' of professional technology experience. He's been writing about tech for more than two decades and serves as the VP and General Manager of Lifewire. lifewire's editorial guidelines Updated on August 20, 2021 Tweet Share Email Tweet Share Email Windows The Ultimate Laptop Buying Guide The expand command is a Command Prompt command used to extract a single file or a group of files from a compressed file.This 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 operating system's CD.
Expand Command Availability
The expand command is available from the Command Prompt in modern versions of Windows, as well as from within the Recovery Console in Windows 2000 and XP.Expand Command Syntax
Use the following syntax for the expand command: expand source [destination] [/r] [/i] [/d] [/f [:filespec]] [/y]The availability of certain expand command switches and other command syntax may differ from operating system to operating system. See How to Read Command Syntax if you're not sure how to read the syntax above or in the table below. Expand Command Options Item Description /r Renames expanded files. source Location of the compressed file. For example, this would be the location of a file on the Windows CD. destination The directory where the source file(s) should be copied to. Can consist of a drive letter and colon, a directory name, a file name, or a combination of these. If source consists of multiple files and you don't specify /r, destination must be a directory. /i Renames expanded files but ignores the directory structure. Applies to Windows Server 2008 R2 and Windows 7. /d Lists the files contained in the source but doesn't extract them. /f:filespec 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. /y Prevents the command from informing you if you are copying over files in this process.