Windows command line to decrypt multiple files

bj blueapplejacks at gmail.com
Wed Dec 4 14:11:36 CET 2013


* Hi.  We are using 64bit Windows 2008 OS.  I am looking forward to your
suggestion.  Thanks*

*----------------------------------------------------------------------------------------------------------*Robert
J. Hansen rjh at sixdemonbag.org
Tue Dec 3 22:04:43 CET 2013

What operating system are you using?  This is the sort of thing that's
more appropriate for a Windows service as opposed to a batchfile.  I
may have something around here that is useful for your niche, but I've
only tested it on a Windows 7/64 box

---------------------------------------- Forwarded message
------------------------------------------------
From: bj <blueapplejacks at gmail.com>
Date: Tue, Dec 3, 2013 at 10:47 PM
Subject: Fwd: Windows command line to decrypt multiple files
To: gnupg-users at gnupg.org


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/20131204/ab7096fc/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/20131204/ab7096fc/attachment.sig>


More information about the Gnupg-users mailing list