gpg: can't open 'file.pgp': No such file or directory

I Was decrypting a file.pgp file, and the file is present in the directed. The powershell script is able to read the name of the file but not able to open it. it says below error:

gpg.exe : gpg: can't open 'file.pgp': No such file or directory 

The code works successfully fine for sometimes and sometimes it shows the above error.

Can anyone let me know what can be issue, that the same decryption code works fine for some runs, but decryption fails for some runs.

0

1 Answer

Did you change the directory to your file's directory?

If the file is in C:\Users\%USERNAME%\Desktop\, you need to run Set-Location -Path C:\Users\%USERNAME%\Desktop\ before decrypting your file.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like