I have this script which sounds like what I want to do:
cat something_so_sign.xzy | gpg \
--passphrase-file "plaintext_passphrase.txt" \
--batch \
--pinentry-mode loopback \
-bsa
which I ran in .bat and then realize this was from Linux. I got that code from here: gpg encrypt file without keyboard interaction
But now I want to do this in CMD and I've researched for hours; I can't find exactly what I want to do. Everything I research either generates a key automatically, doesn't specify a key, or requires user interaction throughout the script run (I need this automated). I also like this particular script because its simple and I understand it. But What is the CMD equivalent of this?
I don't mind using a different method either...but my powershell version on the server is old (2.0) and it would be a huge, time consuming effort to get someone to update that. So, I can't install modules in powershell. It would also not be ideal to have to download external programs. So, I'm coming back to using .bat to encrypt my file, using a key that I'll store in its own file.