Stdin for Extract?

Comments, questions, bug reports, etc.
Post Reply
testtest211
Posts: 1
Joined: Sun Mar 18, 2018 5:39 pm

Stdin for Extract?

Post by testtest211 »

Hi!

Can you please add stdin for extract just like it is for update? So that we can do this in cmd, bash.
It is currently impossible to do this.

Code: Select all

wimlib extract install.wim 1 --dest-dir=C:\ << EOM
\Windows\System32\cmd.exe
\Windows\explorer.exe
\Windows\Fonts
EOM

Code: Select all

(
  echo "\Windows\System32\cmd.exe"
  echo "\Windows\explorer.exe"
  echo "\Windows\Fonts"
) | wimlib extract install.wim 1 --dest-dir=C:\
synchronicity
Site Admin
Posts: 472
Joined: Sun Aug 02, 2015 10:31 pm

Re: Stdin for Extract?

Post by synchronicity »

I added this in wimlib-1.13.0-BETA4. But the syntax you suggested (no path or listfile argument) is already used to mean that the full image should be extracted, so I made a stdin listfile be specified by the argument "@-", i.e. a listfile located at "-" (stdin):

Code: Select all

$ echo /dir | wimextract test.wim 1 @-
Reading pathlist file from standard input...
Extracting file data: 9 MiB of 9 MiB (100%) done
Done extracting files.
Post Reply