batch file automation -Nearly There!

Lee Elcocks l_elcocks at hotmail.co.uk
Fri Oct 8 10:29:04 CEST 2010


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.

 

Im really sorry, ell explain what i need the script to be able to do

 

User can drop any files into drop folder for example lee.txt and the out put of the file will be lee.txt.pgp

also if their was more than one file in their, lee.txt and test.xls the out put would be lee.txt.pgp and test.xls.pgp

 

So with that , will the below script work?
 
> To: l_elcocks at hotmail.co.uk
> Subject: Re: batch file automation -Nearly There!
> From: null at example.com
> Date: Fri, 8 Oct 2010 02:16:49 +0200
> 
> -r = Recipient = Key to Encrypt
> -u = Signator = Key to Sign
> Use Both!
> 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
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20101008/0f56535f/attachment.htm>


More information about the Gnupg-users mailing list