GPA encryption command

I have working to upload weekly a CSV file in the FTP location of the vendor, and vendor provided me the public key to perform the encryption and the FTP user name and password. My FTP script is working perfectly, I am able to connect in the vendor FTP location without any issue. But the problem is I am getting the following error while I am trying to encrypt the CSV file. From graphical window of GPA, the public key is working and it is encrypting the CSV file but I am trying to make it a script to do the encryption. Please advise.
C:\>gpg -v --import "C:\publickKeyofvendor" --output C:\data.csv.gpg --encrypt C:\Data.csv
gpg: can't open `--output': No such file or directory
gpg: [don't know]: invalid packet (ctb=55)
gpg: read_block: read error: Invalid packet
gpg: import from `C:\\Data.csv.gpg' failed: Invalid keyring
gpg: can't open `--encrypt': No such file or directory
gpg: no valid OpenPGP data found.
gpg: Total number processed: 1
gpg:              unchanged: 1
My objective is to using the vendor provided public key, I will encrypt the CSV file and encrypted CSV file will be uploaded to vendor FTP location.
Who is Participating?
The import option is used by itself:
gpg  --import "C:\publickKeyofvendor"

Then do your encryption:
gpg --recipient --output C:\data.csv.gpg --encrypt C:\Data.csv
ipsec600Author Commented:
Excellent thank you NVIT, it works as expected.
Thanks for your update, ipsec600. I'm glad to help. Have a good one.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.