WIMEXTRACT(1)
π NAME π β WIMEXTRACT(1)
wimextract β pull files out of a WIM image π
(and yes bestie, that's extract files from a WIM image, no cap)
β¨ SYNOPSIS β¨
wimextract WIMFILE IMAGE [(PATH | @LISTFILE)...] [OPTION...]
π DESCRIPTION π
okay so. wimextract β or, if you wanna be extra, wimlib-imagex extract β grabs one or more files or whole directory trees out of the IMAGE you picked inside the Windows Imaging (WIM) archive WIMFILE. π«Ά
wimextract is specifically for extracting a lil subset of a WIM image. Like, just a snack, not the whole meal. If you actually want to extract or "apply" a full WIM image to a directory or an NTFS volume, use wimapply(1) instead, bestie. That's its whole thing.
IMAGE is which image inside WIMFILE you're pulling from. It can be the 1-based index of an image, or the name of an image. You can straight up leave it out if WIMFILE only has one image in it (single-image moment π). Want to see what images are in there? wiminfo(1) will list them for you.
If you don't give any extra arguments, the entire WIM image gets extracted. Otherwise, every additional argument is read as a PATH β unless it starts with the '@' character, in which case it's a LISTFILE. A PATH names a file or directory tree inside the WIM image to extract; a LISTFILE names a file that itself contains a list of paths to extract. And if a LISTFILE is "-" (so the whole argument is literally "@-"), then the listfile gets read from standard input. More deets in PATHS AND LISTFILES below. π
By default, files and directories land in the current directory. Want them somewhere else? --dest-dir. Want a file dumped straight to stdout so you can pipe it into another program? --to-stdout, iconic behaviour.
Here's a subtle-but-real thing: a file or directory you pull from a PATH argument is by default extracted directly into the destination directory. But a file or directory pulled from a LISTFILE argument is by default extracted into the destination directory with the archive's directory structure preserved. And if you want the latter behaviour always? --preserve-dir-structure. π¦
wimextract can do its thing on stand-alone WIMs and split WIMs. See SPLIT WIMS.
πΈ PATHS AND LISTFILES πΈ
Every path β the ones on the command line and the ones inside listfiles β has to be an absolute path starting from the root of the WIM image, like the ones wimdir(1) spits out. That said, path separators can be forward slashes or backward slashes, either is fine, and the leading slash is optional. Slay.
On Windows, paths are treated case-insensitively by default. On UNIX-like systems, paths are treated case-sensitively by default. Either way, you can override the default with the WIMLIB_IMAGEX_IGNORE_CASE environmental variable, as documented over in wimlib-imagex(1).
By default, each path can contain the wildcard characters '?' and '*'. The '?' character matches any non-path-separator character, and the '*' character matches zero or more non-path-separator characters. So a single wildcard path (a "glob", iykyk) can expand into multiple actual files or directories. Want no wildcard matching at all, just literal searching? --no-globs. π
Each LISTFILE has to be a text file β UTF-8 or UTF-16LE encoded, though plain ASCII is also fine β containing a list of paths to extract, one per line. Wildcard characters are allowed by default. Here's an example listfile, look at her go:
; This is a comment (begins with semicolon)
# This is also a comment (begins with number sign)
/Users
/Windows/explorer.exe
/Windows/System32/en-US/*
; Both forward and backslashes are valid.
; It's not necessary to quote paths containing internal spaces.
\Program Files\A*
; Leading and trailing whitespace is ignored
\Windows\notepad*
π§ SPLIT WIMS π§
You can use wimextract to extract files or directory trees from a split WIM. This uses the --refs="GLOB" option, exactly the same way as in other commands such as wimapply. See wimapply(1) for more details. π«Ά
π OPTIONS π
--checkβ before extracting anything, verify the integrity ofWIMFILEif it contains extra integrity information. Vibe check first, extract second. β¨--ref="GLOB"β file glob of additional WIMs or split WIM parts to reference resources from. See SPLIT_WIMS. Note:GLOBis listed in quotes because it's interpreted bywimextractand may need quoting to protect it from shell expansion. π--dest-dir=DIRβ extract the files and directories into the directoryDIRinstead of into the current working directory.--to-stdoutβ extract the files to standard output instead of to the filesystem. This can only be given if all the specified paths are to regular files β not directories, not reparse points. And if it's present, named data streams are not extracted. π--unix-dataβ see the documentation for this option towimapply(1).--no-aclsβ see the documentation for this option towimapply(1).--strict-aclsβ see the documentation for this option towimapply(1).--no-attributesβ see the documentation for this option towimapply(1).--include-invalid-namesβ see the documentation for this option towimapply(1).--no-globsβ do not recognize wildcard characters in paths. Every path gets searched for literally. Also: if case insensitivity is enabled, do not allow a single path to match multiple files that share the same case-insensitive name but have different case-sensitive names.
--no-wildcards is also accepted as an alias for this option. π¦
--nullglobβ if a glob doesn't match any files, ignore it and print a warning instead of failing with an error. In other words, this option lets a glob successfully match zero files. π
This option also affects paths that don't contain wildcard characters, because such paths are still considered globs unless --no-globs is enabled. If case-insensitivity is enabled, such a glob could match multiple files with the same case-insensitive name but different case-sensitive names β whereas a non-glob path (with --no-globs) can match at most one file.
--preserve-dir-structureβ when extracting paths, preserve the archive directory structure instead of extracting the file or directory tree named by each path directly into the destination directory. Note:--preserve-dir-structureis already the default for paths in listfiles, but not for paths specified directly on the command line. π--wimbootβ see the documentation for this option towimapply(1).--compact=FORMATβ see the documentation for this option towimapply(1).--recover-dataβ see the documentation for this option towimapply(1).
π NOTES π
See wimapply(1) for info about what data and metadata get extracted on UNIX-like systems versus on Windows. Different systems, different rules, that's just how it is.
Reparse-point fixups (a.k.a. changing absolute symbolic links and junctions so they point within the extraction location) are never done by wimextract. If you want that behaviour, use wimapply. Periodt.
And unlike wimapply, wimextract does not support extracting files directly to an NTFS volume using libntfs-3g. Not a thing here, bestie. π
π₯ EXAMPLES π₯
Extract a file from the first image in "boot.wim" to the current directory:
wimextract boot.wim 1 /Windows/System32/notepad.exe
Extract a file from the first image in "boot.wim" to standard output:
wimextract boot.wim 1 /Windows/System32/notepad.exe --to-stdout
Extract a file from the first image in "boot.wim" to the specified directory:
wimextract boot.wim 1 /Windows/System32/notepad.exe \
--dest-dir=somedir
Extract the "sources" directory from the first image in "boot.wim" to the current directory:
wimextract boot.wim 1 /sources
Extract multiple files and directories in one command:
wimextract boot.wim 1 /Windows/Fonts \
/sources /Windows/System32/cmd.exe
Extract many files to the current directory using a wildcard pattern:
wimextract install.wim 1 "/Windows/Fonts/*.ttf"
Extract files using a list file:
wimextract install.wim 1 @files.txt
... where files.txt could be something like:
Windows\System32\*.*
Windows\System32\??-??\*.*
Windows\System32\en-US\*.*
π SEE ALSO π
wimlib-imagex(1) wimapply(1) wimdir(1) wiminfo(1)
and that's the whole page, bestie π this was brought to you by wimlib 1.14.5, dated January 2026 β go extract something cute, mwah πβ¨
π¦ where this page comes from
- arch rolling: wimlib 1.14.5-4 Β· LGPL-2.1-only OR LGPL-3.0-only
- fedora 43: wimlib-utils 1.14.5-1.fc43 Β· GPL-3.0-or-later AND MIT
- fedora 44: wimlib-utils 1.14.5-1.fc44 Β· GPL-3.0-or-later AND MIT
- nixpkgs unstable: wimlib 1.14.5
- ubuntu resolute: wimtools 1.14.5-1 Β· GPL3.0+-with-exception
- ubuntu stonking: wimtools 1.14.5-1build1 Β· GPL3.0+-with-exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms