empty file generated when running GPG batch

Jerome Baum jerome at jeromebaum.com
Thu Mar 24 11:53:23 CET 2011


jb1111 <johnathan.barbett at elephant.com> writes:

> Hi, this is running in a batch.  It creates a .pgp file, however that file is
> empty.  Any ideas?
>
> SETLOCAL
> PATH=C:\Program
> Files\GNU\GnuPG;c:\encryptedfiles;c:\outgoingdropfolder;%PATH%
>>"%TMP%\~encryptlist.txt" DIR /B "C:\outgoingdropfolder"
> PUSHD "C:\outgoingdropfolder"
> pause
> FOR /F "delims=" %%F IN ('MORE ^< "%TMP%\~encryptlist.txt"') DO (
> pause
> IF EXIST %%F (
> pause
> ECHO Password|GPG --batch --encrypt --passphrase-fd 0 -r Publickey -o
> "C:\encryptedfiles\%%F.pgp"
> pause
> IF ERRORLEVEL == 0 DEL "%%F"
> )
> )
> POPD
> DEL "%TMP%\~encryptlist.*"
> ENDLOCAL

What does it output? Also, sure you want to echo in the password? Seems
like it's not necessary.

-- 
PGP: A0E4 B2D4 94E6 20EE 85BA E45B 63E4 2BD8 C58C 753A
PGP: 2C23 EBFF DF1A 840D 2351 F5F5 F25B A03F 2152 36DA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 880 bytes
Desc: not available
URL: </pipermail/attachments/20110324/3c56335a/attachment.pgp>


More information about the Gnupg-users mailing list