Use of the --passphrase options in gpg4win


I have loaded gpg4win-lite on an Windows XP laptop and have had no issues in decrypting and encrypting files interactively.

I need to script the decryption of files and have tried to do my research. I have submitted the below command lines and received identical errors in all cases.

echo | gpg --verbose --batch --passphrase-fd 0 --output N:\Temp\ --decrypt E:\Temp\


gpg --verbose --batch --passphrase-file C:\Temp\Temp.txt --output N:\Temp\ --decrypt E:\Temp\


gpg --verbose --batch --passphrase --output N:\Temp\ --decrypt E:\Temp\

In all of the above three cases the error is identical:

gpg: handle plaintext failed: General error

Note that if I omit the “passphrase” options I am prompted for the passphrase and if I enter it the command is executed successfully.

Can anyone advise on what may be going wrong here and how I can correct it? I am not currently concerned with the security of any of these options, I simply need to get it working somehow. All advice is welcome and appreciated.