-1

I need some assistance to generate encrypted documents using https://www.gnupg.org/ software.

They have provided the command line as per following.

alice% gpg --output doc.gpg --encrypt --recipient blake@cyb.org doc

But I am not getting as per my file structure how I am suppose to do same.

Please check the following file structure.

Public Key : C:\Encryption\PB_Key.asc

File need to encrypt : C:\Encryption\Test.txt

Bat file : C:\Encryption\Test.bat

gpg.exe : C:\Program Files (x86)\GnuPG\bin\gpg.exe

UserName : Test

I did some research and found few links

Batch encrypt with public key using Gpg4win command line

Need assistance to incorporate above.

Ross Ridge
  • 38,414
  • 7
  • 81
  • 112
coder08
  • 13
  • 4

2 Answers2

0

We can create a batch file as following.

@echo off
"C:\Program Files (x86)\GnuPG\bin\gpg.exe" --import PB_Key.asc
"C:\Program Files (x86)\GnuPG\bin\gpg.exe" -r "Test" -e "C:\Encryption\Test.txt"
coder08
  • 13
  • 4
0

Try this one.

@echo off
CD "C:\Program Files (x86)\GnuPG\bin\gpg.exe"
gpg  --import PB_Key.asc
gpg  -r "Test" -e "C:\Encryption\Test.txt"
Hemant
  • 87
  • 1
  • 9