1WIMEXTRACT(1) User Commands WIMEXTRACT(1)
2
3
4
6 wimextract - Extract files from a WIM image
7
9 wimextract WIMFILE IMAGE [(PATH | @LISTFILE)...] [OPTION...]
10
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
26 extracted. Otherwise, each additional argument is interpreted as a
27 PATH if it does not begin with the '@' character, or a LISTFILE if it
28 does. Each PATH specifies a file or directory tree within the WIM
29 image to extract, whereas each LISTFILE specifies a file that itself
30 contains a list of paths to extract. If a LISTFILE is "-" (i.e. the
31 whole argument is "@-"), then the listfile is read from standard input.
32 See 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.
36 Alternatively, 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
40 extracted directly into the destination directory, whereas a file or
41 directory extracted from a LISTFILE argument is by default extracted
42 into the destination directory in such a way that the archive's direc‐
43 tory structure is preserved. Use --preserve-dir-structure to always
44 get the 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
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
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
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
99 resources 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
163 See wimapply(1) for information about what data and metadata are
164 extracted on UNIX-like systems versus on Windows.
165
166 Reparse-point fixups (a.k.a. changing absolute symbolic links and junc‐
167 tions to point within the extraction location) are never done by wimex‐
168 tract. Use wimapply if you want this behavior.
169
170 Unlike wimapply, wimextract does not support extracting files directly
171 to an NTFS volume using libntfs-3g.
172
174 Extract a file from the first image in "boot.wim" to the current direc‐
175 tory:
176
177 wimextract boot.wim 1 /Windows/System32/notepad.exe
178
179 Extract a file from the first image in "boot.wim" to standard output:
180
181 wimextract boot.wim 1 /Windows/System32/notepad.exe --to-stdout
182
183 Extract a file from the first image in "boot.wim" to the specified
184 directory:
185
186 wimextract boot.wim 1 /Windows/System32/notepad.exe \
187 --dest-dir=somedir
188
189 Extract the "sources" directory from the first image in "boot.wim" to
190 the current directory:
191
192 wimextract boot.wim 1 /sources
193
194 Extract multiple files and directories in one command:
195
196 wimextract boot.wim 1 /Windows/Fonts \
197 /sources /Windows/System32/cmd.exe
198
199 Extract many files to the current directory using a wildcard pattern:
200
201 wimextract install.wim 1 "/Windows/Fonts/*.ttf"
202
203 Extract files using a list file:
204
205 wimextract install.wim 1 @files.txt
206
207 ... where files.txt could be something like:
208
209 Windows\System32\*.*
210 Windows\System32\??-??\*.*
211 Windows\System32\en-US\*.*
212
214 wimlib-imagex(1) wimapply(1) wimdir(1) wiminfo(1)
215
216
217
218wimlib 1.13.1 May 2019 WIMEXTRACT(1)