Command Line PGP with Variable File Name - PGP

This is a discussion on Command Line PGP with Variable File Name - PGP ; Hi, does anyone know how to pass the batch file a variable file name so that it encrypts? It works fine with a static file name, but my file name changes daily. thanks, paul...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Command Line PGP with Variable File Name

  1. Command Line PGP with Variable File Name

    Hi,

    does anyone know how to pass the batch file a variable file name so
    that it encrypts?

    It works fine with a static file name, but my file name changes daily.

    thanks,
    paul


  2. Re: Command Line PGP with Variable File Name

    On 10 Jun 2005 13:13:23 -0700, paulmac106@hotmail.com wrote:

    >Hi,
    >
    >does anyone know how to pass the batch file a variable file name so
    >that it encrypts?
    >
    >It works fine with a static file name, but my file name changes daily.


    Try this in a batch file 'encrypt.bat'

    C:\Programs\PGPcmd\pgp.exe -e %1 0xXXXXXXXX
    if errorlevel 1 pause

    For 0xXXXXXXXX take the number of the desired keyID
    The available keyIDs you can find out with the DOS-command pgp -kv
    It works fine with my pgp 6.5.8 command line version under XP Pro.
    Correct the part 'c:\programs\pgpcmd' according to your installation.

    To decrypt any file have this in 'decrypt.bat'

    C:\Programs\PGPcmd\pgp %1
    if errorlevel 1 pause

    Then you'll be prompted for the pass word and then pgp decrypts the
    desired file.

    Best regards
    Klaas

+ Reply to Thread