I have a script to automate files, but when I want to encrypt several I get the error:
use: gpg [options] --encrypt [filename]
I can only encrypt from one file, could someone solve this problem?
The line I use is IN BATCH:
gpg.exe --trust-model always --encrypt --recipient myPublickey “path file”
As the gpg-agent will cache a manually entered passphrase by default, it is fine to use the loop with keys that need a manual passphrase. The other possibility is to use a key without passphrase (and secure the system according to your security needs).