How can I extract the --embedded-filename for scripting?

Peter Lebbing peter at
Wed May 8 17:18:01 CEST 2013

On 08/05/13 14:03, Michael Scheer wrote:
> | "%GNUPGHOME%gpg.exe" --status-fd 2 --use-embedded-filename %1 2>"%temp%\out.txt"

2 is standard error (at least, I suppose Windows does that too), so it will be
mixed with any other output to stderr. On Linux, I see the "gpg: encrypted
with..." message on stderr together with the status-fd output.

Depending on the buffering chosen for standard error, it might be racey: if some
other message mingles with [GNUPG:] PLAINTEXT... it might become unreadable for
your script.

Somebody with good Windows scripting knowledge might be able to help you keep it


I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at <>

More information about the Gnupg-users mailing list