expand By robinharwood Archived: 2026-04-05 13:10:12 UTC Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012 Expands one or more compressed files. You can also use this command to retrieve compressed files from distribution disks. The expand command can also run from the Windows Recovery Console, using different parameters. For more information, see Windows Recovery Environment (WinRE). Syntax expand [-r] expand -r [] expand -i [] expand -d .cab [-f:] expand .cab -f: Parameters Parameter Description -r Renames expanded files. source Specifies the files to expand. Source can consist of a drive letter and colon, a directory name, a file name, or a combination of these. You can use wildcards (* or ?). destination Specifies where files are to be expanded. If source consists of multiple files and you don't specify -r, the destination must be a directory that already exists. Destination can consist of a drive letter and colon, a directory name, a file name, or a combination of these. Destination file \| path specification. -i Renames expanded files but ignores the directory structure. -d Displays a list of files in the source location. Doesn't expand or extract the files. -f: Specifies the files in a cabinet (.cab) file that you want to expand. You can use wildcards (* or ?). https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/expand Page 1 of 2 Parameter Description /? Displays help at the command prompt. Related links Command-Line Syntax Key Source: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/expand https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/expand Page 2 of 2