How to change output directory of --decrypt-files

I actually use latest GPG4WIN-Version with Windows2008:
gpg2 --batch
–passphrase xyz --decrypt-files

I want all decrypted files directly in a different directory.
Is that possible ?

Hi Jürgen,
to my knowledge there is no direct mode of gpg2 to do this.
So you probably will have to write a small script.


Thanks for confirming.
Do you think it s worth to make a change request to the gpg4win - team ? If yes, can aou tell me how to make a request ?

you can submit ideas to or the
Though writing here or on the mailinglist may also have the effect
of developers noticing (I am a part of the Gpg4win Team).

If done I think it it probably is a question of GnuPG command line handling itself.
(Gpg4win basically packages the GnuPG backend for windows.)
As this can be scripted with reasonable low efforts, I guess that
is will not be a strong use case.

What keeps you from using a .bat script?

Best Regards,

You are absolutely right … it s possible to modify our scripts to do that.
Actually our .bat programms use PGP command line and there it is possible to decrypt multiple files directly to a different directory.

To archive that in 2 steps … decrypting and moving … means to modify programm code and error handling. … and its a further potential source of error (esp. locks).

For sure it is not a strong use case … but its a little more smart and secure…
Regards and thanks

You could script it in a way that decryption to a different directory is done per file.
When dealing with several files, it usually makes sense to use an archiver.