Yet another Windows batch question
dissectingtable at comcast.net
Fri Feb 6 19:22:48 CET 2004
-----BEGIN PGP SIGNED MESSAGE-----
Kevin Flanagan wrote:
| I'm trying, on a Windows system to do encryption of a file and logging
| the output to a log file, that will be used by the user, and later
| administrators or auditors to verify the process. Something like this.
| gpg -e -v -r joe.blow at company.com -o foo.pgp %1 > foo.log
| I need to make the output be .pgp extention, this part works just fine.
| The log file is the issue, it creates foo.log, but the output of the
| gpg command isn't there.
It seems as though gpg reserves stdout for formatted data; every time I
redirect a successful gpg call I get the en/decrypted material coming out.
Seems like messages you'd want to save come out stderr, in which case
you want to change your script to
| gpg -e -v -r joe.blow at company.com -o foo.pgp %1 2> foo.log
Note the 2 before the >
I just tried it and it works.
Chris Fox, Windows User, Linux User (#341856), non-partisan
Since free markets lead directly to monopoly, oligarchy, poverty,
unemployment, and Fascism, they cannot be said to "work" in any
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Gnupg-users