[Gpg4win-users-en] What Is Correct Syntax For GnuPG Encryption Command?

Kent Hurtig kent_hurtig at friends.edu
Thu Dec 4 19:15:24 CET 2014

Hi gpg4win users,

I am trying to create a batch file that will encrypt a file using GnuPG software.  On page 60 in the Using the GNU Privacy Guard manual under 3.4 Examples, the example given to sign and encrypt for user Bob is "gpg -se -r Bob file".
I enter the following command:

C:\Program Files\GNU\GnuPG>gpg2 -e -r Educational Computer Systems Inc E:\sftproot\perkins_loan\TESTbldpromIG20141201.csv

After I hit enter, the dos window displays:  usage: gpg [options] -encrypt [filename] and there is no encrypted file in my E:\sftproot\perkins_loan directory.

If I enter the following (not specifying the recipient) with my responses highlighted:
C:\Program Files\GNU\GnuPG>gpg2 -e E:\sftproot\perkins_loan\TESTbldpromIG20141201.csv
You did not specify a user ID. <you may use "-r">

Current recipients:

Enter the user ID.  End with an empty line: Educational Computer Systems Inc
gpg: 21CBF00F: There is no assurance this key belongs to the named user

pub  1024R/21CBF00F 2002-12-05 Educational Computer Systems Inc <admin at ecsi.net>

Primary key fingerprint: F2 2B 3E 5C 85 3F 0D C7  22 F8 60 D0 70 A9 F1 75

It is NOT certain that the key belongs to the person named
in the user ID.  If you *really* know what you are doing,
you may answer the next question with yes.

Use this key anyway? <y/N> y

Current recipients:
1024R/21CBF00F 2002-12-05 "Educational Computer Systems Inc <admin at ecsi.net>"

Enter the user ID.  End with an empty line: <Enter>

When I check E:\sftproot\perkins_loan, there is a TESTbldrpromIG20141201.csv.gpg file.

How do I code gpg2 to encrypt the TESTbldpromIG20141201.csv file using the public key for Educational Computer Systems Inc ?  I need to be able to add this to my batch file.

Best regards,

Kent Hurtig
Friend's University
kent_hurtig at friends.edu<mailto:kent_hurtig at friends.edu>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wald.intevation.org/pipermail/gpg4win-users-en/attachments/20141204/1cb230f8/attachment.html>

More information about the Gpg4win-users-en mailing list