Command Line Options Question

Hey guys,
I am trying to create a .BAT that will walk through a directory decrypting the files. How does the command line look for decrypting a single file? As well even using the GUI it wants me to reenter the key for every file I would prefer to enter it once and not hundreds of times. Is there a way I can create a key file that will handle this?

Hi @NoobMaster,
to decrypt a file you can use the command gpg --decrypt <file-name> (without <>).

Do you mean that you have files that are each encrypted with a different key?

Have a look at Unattended Encryption of Files

There the subject of unattended encryption with GnuPG on the command line is explained in some detail.
Just leave off “–require-compliance”, as the option is only necessary in GnuPG VS-Desktop and not in Gpg4win.

No, they all use the same key. The script I’m trying to use uses the --passphrase option. The gpg exe seems to not like it. It still pops an enter passphrase box for each file.

Thank you for the link. I will look through that documentation.

To clarify I am talking symmetric encryption.

Yeah just add “–pinentry-mode loopback” to your command and you are golden. I still don’t get it why GnuPG does not imply that option when one of the --pasphrase options is used. :roll_eyes: See: https://wiki.gnupg.org/TroubleShooting#Command_line_operations

–pinentry-mode=loopback and then I switched to a file from CLI input. Looking through the documentation I think it was to make the encryption software compliant with whatever standard.

Thanks guys for all the help btw.