Fwd: Windows command line to decrypt multiple files

bj blueapplejacks at gmail.com
Wed Dec 4 04:47:59 CET 2013


Hi.  Good catch.  I previously did not need to supply a password to
encrypt.  I know the password, just not sure where to define it with
GPG4Win or other method.  Even though the server is internal, I want it to
be secure.  I could lock down file permissions if that helps.
When I try #2, it gives me the following   usage: gpg [options] [filename]
I still get this putting the file at the end.
Thanks, BJ

---------- Forwarded message ----------
From: Hauke Laging <mailinglisten at hauke-laging.de>
Date: Tue, Dec 3, 2013 at 2:55 PM
Subject: Re: Windows command line to decrypt multiple files
To: gnupg-users at gnupg.org
Cc: bj <blueapplejacks at gmail.com>


Am Di 03.12.2013, 12:21:26 schrieb bj:

> Where is password defined?

passwort is (implicitly) defined in the keyring. The secret key is stored
encrypted. You need the passphrase in order to use the key. You must know
the
passphrase, you cannot get it from the GnuPG installation.


> *FOR /F "delims=" %%F IN ('MORE ^< "%TMP%\~encryptlist.txt"') DO (IF EXIST
> %%F (ECHO Password|GPG --batch --encrypt --passphrase-fd 0 -r F75C5TE0 -o
> "C:\encryptedfiles\%%F.pgp" %%F IF ERRORLEVEL == 0 DEL "%%F"))POPD*
> (NEXT SECTION IS FTP TRANSFERS)

I am not familiar with that DOS / Windows stuff. Just a few comments:

1) You do not need a passphrase when you encrypt files. You need the
passphrase for signing and decrypting.

2) ECHO Password|
gpg --passphrase-fd 0 --batch -o "..." --decrypt %%F
should do.


Hauke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20131203/6e568651/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 585 bytes
Desc: not available
URL: </pipermail/attachments/20131203/6e568651/attachment.sig>


More information about the Gnupg-users mailing list