batch file automation -Nearly There!
John Clizbe
John at Mozilla-Enigmail.org
Sat Oct 9 05:51:01 CEST 2010
Lee Elcocks wrote:
> Hi, I have the signing key as the default key in the config file, do i
> still have to use both in the command, the encyption and signing is
> working perfectly, just the output of the file name (and size) that i
> cannot get to work.
If the signing key is specified with default-key in gpg.conf, you are not
required to list it as the signing key on the command line. The same would apply
with default-recipient-self and the recipient on the command line. However,
doing so better documents what your batch file is doing.
>
<snip>
>> In batch Variable needs Double Percent (%%)
>>
>> SETLOCAL
>> PATH=C:\Program Files (x86)\GNU\GnuPG;%PATH%
>> > "%TMP%\~encryptlist.txt" DIR /B "C:\OutgoingDropFolder"
>> PUSHD "C:\outgoingdropfolder"
>> FOR /F "delims=" %%F IN ('MORE ^< "%TMP%\~encryptlist.txt"') DO (
>> IF EXIST %%F (
>> ECHO bingos| GPG --batch -se --passphrase-fd 0 -r PGPTOKEY -u PGPTOKEY
> -o "C:\EncryptedFiles\%%F.pgp"
>> IF ERRORLEVEL == 0 DEL "%%F"
>> )
>> )
>> POPD
>> DEL "%TMP%\~encryptlist.txt"
>> ENDLOCAL
Your command isn't giving gpg anything to encrypt
ECHO bingos| GPG --batch -se --passphrase-fd 0 -r PGPTOKEY -u PGPTOKEY
-o "C:\EncryptedFiles\%%F.pgp" "%%F"
--
John P. Clizbe Inet:John (a) Mozilla-Enigmail.org
FSF Assoc #995 / FSFE Fellow #1797 hkp://keyserver.gingerbear.net or
mailto:pgp-public-keys at gingerbear.net?subject=HELP
Q:"Just how do the residents of Haiku, Hawai'i hold conversations?"
A:"An odd melody / island voices on the winds / surplus of vowels"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 502 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20101008/4fc49460/attachment.pgp>
More information about the Gnupg-users
mailing list