SYNOPSISwimlib-imagex export SRC_WIMFILE SRC_IMAGE DEST_WIMFILE [DEST_IMAGE_NAME [DEST_IMAGE_DESCRIPTION]] [OPTION...]
DESCRIPTIONCopies the specified image in SRC_WIMFILE to DEST_WIMFILE, optionally changing its name and/or description and/or compression type. If DEST_WIMFILE exists, it is taken be a WIM archive to which the image will be appended. Otherwise, it is created as a new WIM archive containing only the exported image. This command is also available as simply wimexport if the appropriate hard link or batch file has been installed.
SRC_IMAGE specifies the image in SRC_WIMFILE to export. It may be a 1-based index of an image in SRC_WIMFILE, the name of an image in SRC_WIMFILE, or the keyword "all" to indicate that all images in SRC_WIMFILE are to be exported. Use the wimlib-imagex info (1) command to list the images a WIM file contains.
If specified, DEST_IMAGE_NAME is the name to give the image being exported to DEST_WIMFILE. The default is its name in SRC_WIMFILE. DEST_IMAGE_NAME cannot be specified if multiple images are being exported.
If specified, DEST_IMAGE_DESCRIPTION is the description to give the image being exported to DEST_WIMFILE. The default is its description in SRC_WIMFILE.
wimlib-imagex export supports exporting images from stand-alone WIMs as well as from split WIMs. However, you cannot export an image to a split WIM. See SPLIT WIMS.
wimlib-imagex export also supports exporting images from a non-pipable WIM into a (possibly new) pipable WIM, and vice versa. Furthermore, it will export a pipable WIM directly to standard output if "-" is specified as DEST_WIMFILE (this implies --pipable). See --pipable and --not-pipable.
- Specifies that the exported image is to be the bootable image of the destination WIM archive.
- If multiple images are being exported, this flag indicates that the image in the SRC_WIMFILE that is currently marked as bootable is to be made bootable in DEST_WIMFILE. If no image in SRC_WIMFILE is bootable, it is an error.
- When reading SRC_WIMFILE, and DEST_WIMFILE if it exists, verify the file's integrity if the integrity table is present; additionally, when writing DEST_WIMFILE with the new image(s) added, write an integrity table. If neither --check nor --nocheck is specified, an integrity table is included in DEST_WIMFILE if and only if DEST_WIMFILE already existed and it had an integrity table before.
- When writing DEST_WIMFILE with the new image(s) added, do not write an integrity table. If neither --check nor --nocheck is specified, an integrity table is included in DEST_WIMFILE if and only if DEST_WIMFILE already existed and it had an integrity table before.
- Specifies the compression type, and optionally the compression level for that compression type, for DEST_WIMFILE. Setting the compression type only has an effect if DEST_WIMFILE does not yet exist, since if DEST_WIMFILE exists, the compression type must be the same as that of DEST_WIMFILE.
- See the documentation for this option to wimlib-imagex capture (1) for more details.
- Force all exported data to be recompressed, even if the destination WIM will use the same compression type as the source WIM.
- Set the WIM compression chunk size to SIZE. See the documentation for this option to wimlib-imagex capture (1) for more details.
- Create a "solid" archive that compresses multiple files together. This can result in a higher compression ratio, but has disadvantages such as reduced compatibility. See the documentation for this option to wimlib-imagex capture (1) for more details.
- Like --chunk-size, but set the chunk size used in solid resources. See the documentation for this option to wimlib-imagex capture (1) for more details.
- Like --compress, but set the compression type used in solid resources. See the documentation for this option to wimlib-imagex capture (1) for more details.
- Number of threads to use for compressing data. Default: autodetect (number of processors). Note: multiple compressor threads are not very useful when exporting to a WIM with the same compression type as the source WIM, since wimlib optimizes this case by re-using the raw compressed data.
- When exporting image(s) to an existing WIM: rebuild the entire WIM rather than appending data to the end of it. Rebuilding the WIM is slower, but will save a little bit of space that would otherwise be left as a hole in the WIM. Also see wimlib-imagex optimize.
- File glob of additional WIMs or split WIM parts to reference resources from. See SPLIT_WIMS. This option can be specified multiple times. Note: GLOB is listed in quotes because it is interpreted by wimlib-imagex and may need to be quoted to protect against shell expansion.
- Build, or rebuild, DEST_WIMFILE as a "pipable WIM" so that it can be applied fully sequentially, including from a pipe. See wimlib-imagex capture(1) for more details about creating pipable WIMs. The default without this option is to make DEST_WIMFILE pipable if and only if it already existed and was already pipable, or was "-" (standard output).
- Build, or rebuild, DEST_WIMFILE as a normal, non-pipable WIM. This is the default behavior, unless DEST_WIMFILE already existed and was already pipable, or if DEST_WIMFILE was "-" (standard output).
- Mark the destination image as WIMBoot-compatible. Also, if exporting to a new archive, set the compression type to that recommended for WIMBoot (currently, XPRESS with 4096 byte chunks).
- Compact the WIM archive in-place and append any new data, eliminating "holes". In general, this option should not be used because a failed or interrupted compaction will corrupt the WIM archive. For more information, see the documentation for this option in wimlib-imagex-optimize (1).
SPLIT WIMSYou may use wimlib-imagex export to export images from a split WIM. The SRC_WIMFILE argument must specify the first part of the split WIM, while the additional parts of the split WIM must be specified in one or more --ref="GLOB" options. Since globbing is built into the --ref option, typically only one --ref option is necessary. For example, the names for the split WIM parts usually go something like:
mywim.swm mywim2.swm mywim3.swm mywim4.swm mywim5.swm
- wimlib-imagex export mywim.swm 1 other.wim --ref="mywim*.swm"
NOTESData integrity: Except when using --unsafe-compact, it is safe to abort a wimlib-imagex export command partway through. However, after doing this, it is recommended to run wimlib-imagex optimize on the destination WIM to remove any data that was appended to the physical WIM file but not yet incorporated into the structure of the WIM, unless the WIM was being rebuilt (e.g. with --rebuild), in which case you should delete the temporary file left over.
Single instancing: The WIM format uses single-instance streams (roughly, "files"). When an image is exported, only the streams ("files") not already present in the destination WIM will be copied. However, a new copy of the image's metadata resource, which describes the full directory structure, will always be created.
ESD files: wimlib v1.6.0 and later can export images from version 3584 WIMs, which usually contain LZMS-compressed solid resources and may carry the .esd file extension rather than .wim. However, .esd files downloaded directly by the Windows 8 web downloader have encrypted segments, and wimlib cannot export images from such files until they are first decrypted. In addition, to ensure the destination archive is created in the original WIM format rather than in the newer format, specify --compress=LZX (or --compress=maximum).
EXAMPLESExport the second image of 'boot.wim' to the new WIM file 'new.wim':
wimlib-imagex export boot.wim 2 new.wim
The above example creates "new.wim" with the same compression type as "boot.wim". If you wish to change the compression type, specify --compress=TYPE; for example:
wimlib-imagex export boot.wim 2 new.wim --compress=LZX
Export "ESD to WIM" --- that is, solid WIM to non-solid WIM:
wimlib-imagex export install.esd all install.wim --compress=LZX
Export "WIM to ESD" --- that is, non-solid WIM to solid WIM:
wimlib-imagex export install.wim all install.esd --solid