title: Batch encrypt with public key using Gpg4win command line
body: <p>We are setting up our first EDI system that relies on incoming and outgoing file encryption using OpenPGP. The incoming files that are encrypted with our public key, we can successfully decrypt using our private key using Gpg4win's command line option:</p>
  <pre><code>gpg --batch --passphrase &quot;SOME_KEY&quot; --decrypt-files &quot;%decryptingdir%\*.pgp&quot;
  </code></pre>
  <p>What I now need to do, is the reverse, and encrypt the outgoing files using our partners public key.</p>
  <p>I have been unable to find any command line documentation around batch encryption using a public key. I assumed it would be something in the order of:</p>
  <pre><code>gpg --batch --encrypt-files &quot;%encryptingdir%\*.pgp&quot; --key &quot;SOME_KEY_PATH&quot;
  </code></pre>
  <p>Can anyone advise how I can achieve this encryption via the command line?</p>