gpg.exe Command Line - check if file is already encrypted

Javier González del Tánago jtanago at dilmun.ls.fi.upm.es
Thu Sep 6 23:45:38 CEST 2012


Hi,
try this:

$ gpg --decrypt --list-only --status-fd 1 <file>

Jeff Michelson <jeffmic at hotmail.com> wrote:

>
>I'm using the following command line:
>
>C:\"Program Files (x86)"\GNU\GnuPG\pub\gpg.exe --batch -v -r "MyEVU" -o
>"c:\users\anonymoose\desktop\test.pdf.gpg" -e
>"c:\users\anonymoose\desktop\test.pdf"
>
>That command encrypts the files correctly and the new test.pdf.gpg file is
>created successfully.
>
>I'm trying to figure out how to use the gpg.exe to check if the file is
>encrypted.  In my example above, the obvious answer is that the new
>test.pdf.gpg is encrypted.  However, I'm also going to be given a set of
>files that won't have the gpg extension, and I won't know if they are
>already encrypted.
>
>I do not have whatever is necessary to un-encrypt the files encrypted by
>that MyEVU key, and I don't care if the file was encrypted using that key or
>not.  I only need to know if the file is encrypted at all so that I don't
>double encrypt it.
>
>Is there a command line option/syntax that would just return information
>telling me the file is already encrypted?
>
>Much appreciated, y'all.
>
>--Jeff
>-- 
>View this message in context: http://old.nabble.com/gpg.exe-Command-Line---check-if-file-is-already-encrypted-tp34395622p34395622.html
>Sent from the GnuPG - User mailing list archive at Nabble.com.
>
>
>_______________________________________________
>Gnupg-users mailing list
>Gnupg-users at gnupg.org
>http://lists.gnupg.org/mailman/listinfo/gnupg-users


More information about the Gnupg-users mailing list