I'm trying to create a batch file to encrypt a txt file with OpenPGP.

I figured out the commands to actually do the encryption but it was always asking me for a passphrase, so I searched online and found this but it doesn't work, it's still asking me for my passphrase.

I'm using a Windows operating system.

Code:
echo mypassphrase | gpg --passphrase-fd 0 -se -r [email protected] File.txt
When it asks me for my passphrase, and I enter it, it does work. I just want it to be automated.

Any help would be great!

Thank You!