1WIMEXTRACT(1)                    User Commands                   WIMEXTRACT(1)
2
3
4

NAME

6       wimextract - Extract files from a WIM image
7

SYNOPSIS

9       wimextract WIMFILE IMAGE [(PATH | @LISTFILE)...]  [OPTION...]
10

DESCRIPTION

12       wimextract, or equivalently wimlib-imagex extract, extracts one or more
13       files or directory trees from the specified IMAGE contained in the Win‐
14       dows Imaging (WIM) archive WIMFILE.
15
16       wimextract is intended for extracting only a subset of a WIM image.  If
17       you want to extract or "apply" a full WIM image to a directory or  NTFS
18       volume, use wimapply(1) instead.
19
20       IMAGE specifies the image in WIMFILE from which to extract the files or
21       directory trees.  It may be the 1-based index of an image or  the  name
22       of  an  image.   It  may be omitted if WIMFILE contains only one image.
23       You can use wiminfo(1) to list the images contained in WIMFILE.
24
25       If no additional arguments are given,  the  entire  WIM  image  is  ex‐
26       tracted.   Otherwise, each additional argument is interpreted as a PATH
27       if it does not begin with the '@' character, or a LISTFILE if it  does.
28       Each  PATH  specifies  a file or directory tree within the WIM image to
29       extract, whereas each LISTFILE specifies a file that itself contains  a
30       list  of  paths to extract.  If a LISTFILE is "-" (i.e. the whole argu‐
31       ment is "@-"), then the listfile is  read  from  standard  input.   See
32       PATHS AND LISTFILES for more details.
33
34       By  default,  files and directories are extracted to the current direc‐
35       tory.  Use --dest-dir to select a different destination directory.  Al‐
36       ternatively,  use  --to-stdout  to extract a file to standard output to
37       pipe into another program.
38
39       A file or directory extracted from a PATH argument is  by  default  ex‐
40       tracted  directly into the destination directory, whereas a file or di‐
41       rectory extracted from a LISTFILE argument is by default extracted into
42       the  destination  directory  in such a way that the archive's directory
43       structure is preserved.  Use --preserve-dir-structure to always get the
44       latter behavior.
45
46       wimextract  supports  extracting  files and directory trees from stand-
47       alone WIMs as well as split WIMs.  See SPLIT WIMS.
48

PATHS AND LISTFILES

50       Each path, including those on the command line and those in  listfiles,
51       must be specified as an absolute path starting from the root of the WIM
52       image, like those output by wimdir(1).  However, path separators may be
53       either forward or backward slashes, and the leading slash is optional.
54
55       On Windows, by default paths are treated case-insensitively, whereas on
56       UNIX-like systems, by default paths are treated  case-sensitively.   In
57       either  case,  the  default behavior may be overridden through the WIM‐
58       LIB_IMAGEX_IGNORE_CASE environmental variable, as documented in wimlib-
59       imagex(1).
60
61       By  default, each path may contain the wildcard characters '?' and '*'.
62       The '?'  character matches any  non-path-separator  character,  whereas
63       the  '*'  character matches zero or more non-path-separator characters.
64       Consequently, a single wildcard path, or "glob", may expand to multiple
65       actual  files  or  directories.   Use  the --no-globs option to disable
66       wildcard matching and search for each path literally.
67
68       Each LISTFILE must be a text file (UTF-8  or  UTF-16LE  encoded;  plain
69       ASCII  is  also fine) that contains a list of paths to extract, one per
70       line.  Wildcard characters  are  allowed  by  default.   The  following
71       demonstrates an example listfile:
72
73              ; This is a comment (begins with semicolon)
74              # This is also a comment (begins with number sign)
75              /Users
76              /Windows/explorer.exe
77              /Windows/System32/en-US/*
78
79              ; Both forward and backslashes are valid.
80              ; It's not necessary to quote paths containing internal spaces.
81              \Program Files\A*
82
83              ; Leading and trailing whitespace is ignored
84                  \Windows\notepad*
85
86

SPLIT WIMS

88       You may use wimextract to extract files or directory trees from a split
89       WIM.  This uses the --refs="GLOB" option in the same way  as  in  other
90       commands such as wimapply.  See wimapply(1) for more details.
91

OPTIONS

93       --check
94             Before  extracting  the files, verify the integrity of WIMFILE if
95             it contains extra integrity information.
96
97       --ref="GLOB"
98             File glob of additional WIMs or split WIM parts to reference  re‐
99             sources  from.   See  SPLIT_WIMS.  Note: GLOB is listed in quotes
100             because it is interpreted by wimextract and may need to be quoted
101             to protect against shell expansion.
102
103       --dest-dir=DIR
104             Extract the files and directories to the directory DIR instead of
105             to the current working directory.
106
107       --to-stdout
108             Extract the files to standard output instead of to  the  filesys‐
109             tem.  This can only be provided if all the specified paths are to
110             regular files (not directories or reparse points).   If  present,
111             named data streams are not extracted.
112
113       --unix-data
114             See the documentation for this option to wimapply(1).
115
116       --no-acls
117             See the documentation for this option to wimapply(1).
118
119       --strict-acls
120             See the documentation for this option to wimapply(1).
121
122       --no-attributes
123             See the documentation for this option to wimapply(1).
124
125       --include-invalid-names
126             See the documentation for this option to wimapply(1).
127
128       --no-globs
129             Do not recognize wildcard characters in paths.  Each path will be
130             searched for literally.  In addition, if  case  insensitivity  is
131             enabled,  do not allow a single path to match multiple files with
132             the  same  case-insensitive  name  but  different  case-sensitive
133             names.
134
135             --no-wildcards is also accepted as an alias for this option.
136
137       --nullglob
138             If a glob does not match any files, ignore it and print a warning
139             instead of failing with an error.  In other  words,  this  option
140             allows a glob to successfully match zero files.
141
142             This option also affects paths that do not contain wildcard char‐
143             acters, since such paths are still considered globs unless  --no-
144             globs  is enabled.  If case-insensitivity is enabled, such a glob
145             could match multiple files with the  same  case-insensitive  name
146             but different case-sensitive names, whereas a non-glob path (with
147             --no-globs) can match at most one file.
148
149       --preserve-dir-structure
150             When extracting paths, preserve the archive  directory  structure
151             instead  of  extracting  the file or directory tree named by each
152             path directly to the destination  directory.   Note:  --preserve-
153             dir-structure  is already the default behavior for paths in list‐
154             files, but not paths directly specified on the command line.
155
156       --wimboot
157             See the documentation for this option to wimapply(1).
158
159       --compact=FORMAT
160             See the documentation for this option to wimapply(1).
161
162       --recover-data
163             See the documentation for this option to wimapply(1).
164

NOTES

166       See wimapply(1) for information about what data and  metadata  are  ex‐
167       tracted on UNIX-like systems versus on Windows.
168
169       Reparse-point fixups (a.k.a. changing absolute symbolic links and junc‐
170       tions to point within the extraction location) are never done by wimex‐
171       tract.  Use wimapply if you want this behavior.
172
173       Unlike  wimapply, wimextract does not support extracting files directly
174       to an NTFS volume using libntfs-3g.
175

EXAMPLES

177       Extract a file from the first image in "boot.wim" to the current direc‐
178       tory:
179
180              wimextract boot.wim 1 /Windows/System32/notepad.exe
181
182       Extract a file from the first image in "boot.wim" to standard output:
183
184              wimextract boot.wim 1 /Windows/System32/notepad.exe --to-stdout
185
186       Extract  a file from the first image in "boot.wim" to the specified di‐
187       rectory:
188
189              wimextract boot.wim 1 /Windows/System32/notepad.exe \
190                     --dest-dir=somedir
191
192       Extract the "sources" directory from the first image in  "boot.wim"  to
193       the current directory:
194
195              wimextract boot.wim 1 /sources
196
197       Extract multiple files and directories in one command:
198
199              wimextract boot.wim 1 /Windows/Fonts \
200                     /sources /Windows/System32/cmd.exe
201
202       Extract many files to the current directory using a wildcard pattern:
203
204              wimextract install.wim 1 "/Windows/Fonts/*.ttf"
205
206       Extract files using a list file:
207
208              wimextract install.wim 1 @files.txt
209
210        ...  where files.txt could be something like:
211
212                     Windows\System32\*.*
213                     Windows\System32\??-??\*.*
214                     Windows\System32\en-US\*.*
215

SEE ALSO

217       wimlib-imagex(1) wimapply(1) wimdir(1) wiminfo(1)
218
219
220
221wimlib 1.13.4                     April 2021                     WIMEXTRACT(1)
Impressum