How to pipe the feedback to a file

Ping Kam pkam@quikcard.com
Mon Jun 9 23:14:02 2003


Hi:

I am trying to automate the encrypt and decrypt process by calling a command
file from a Windows app.  I have get everything almost working.

Here is the command file:
echo %2|gpg.exe -o %5 -a --passphrase-fd 0 -r %3 --encrypt-to %1 -e -s %4

So I call it like

MyCommand My_Passphrase MyID, RecipientID, SourceFile, EncryptedFile

The first problem is that GPG will encrypt the file even if the recipient or
encrypt-to is entered wrong.  What I mean is there is no key in the keyring
for these ID.  I tested it by typing them wrong.  The file is created and
there is no error in the feedback.  Is there an option that can force a
check on the recipient or the encrypt-to?

It works fine if a wrong passphrase is entered.  The file is not created, an
error message is in the feedback in the command mode.  But I can't save the
error to a log file so when I call the command file from my windows app, all
I know is that the file is not created.  But I have no idea what went wrong.
Is there an option or command to save the error or the feedback to a file?

Thanks,
Ping Kam