Page 1 of 1

Stdin for Extract?

Posted: Sun Mar 18, 2018 5:44 pm
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:\

Re: Stdin for Extract?

Posted: Sat Jul 21, 2018 7:11 pm
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.