PGPDECRYPT        Decrypt a PGP encrypted file

Top  Previous  Next

Syntax:

PGPDECRYPT

[ encrypt file ] [ target file ] [ keyring ] [  options ]

Arguments:

[ encrypt file ]

A variable or string defining the file name of the PGP encrypted file to decrypt; this file may or may not be ASCII armored. Wildcard characters are not permitted in [ encrypt file ] or [ target file ].

 

[ target file ]

A variable or string defining the file name of the decrypted file; if the file exists, it will be overwritten. If an empty string is provided (i.e., “”) then the decrypted file is written to the original file name saved when the file was encrypted.

 

[ keyring ]

Optional variable or string defining the location of an alternate GPG style keyring to be used in the decryption. This option is deprecated and may be removed in a future release

Options:

/pw=xx

The PGP key Passphrase field associated with the PGP key to be used in the decryption; if you have only one key on your keyring and you saved the Passphrase field when creating or selecting the key using the Robo-FTP configurator, you may omit this option.

 

 

This script command decrypts a file encrypted using PGP encryption. Files may have been encrypted using the Robo-FTP PGPENCRYPT script command or any other PGP or GPG encryption application.

 

To decrypt a file, you must have an existing keyring containing your private key and have imported the public key of the originator of the file. You must specify your passphrase either within the command itself using the /pw option or by previously specifying it when creating or selecting a key using the Robo-FTP configurator.

 

Below is a decryption example where the passphrase has been previously defined and the keyring file exists in the Robo-FTP working folder.

 

PGPDECRYPT "encrypted.txt.gpg" "decrypted.txt"

 

You can also write the decrypted file to a different folder as shown below.

 

PGPDECRYPT "encrypted.txt.gpg" "c:\new\decrypted.txt"

 

If you haven’t saved the passphrase when creating the keyring then you will need to provide the passphrase on the PGPDECRYPT command as shown below.

 

PGPDECRYPT "encrypted.txt.gpg" "decrypted.txt" /pw="my passphrase"

 

Important

Robo-FTP secures your passphrase by saving it in an encoded format in the Windows registry along with its other settings. The passphrase is also never displayed in the Robo-FTP console window nor written to any log file. But be aware that it does appear in clear-text in a script file. Therefore, the method of specifying your passphrase during configuration is the most secure.

 

The original file name of an encrypted file is often embedded within the decrypted file. Robo-FTP allows an encrypted file to be automatically set to this name and saved in the current working folder by using the following syntax (Note: the [ target file ] is an empty string).

 

PGPDECRYPT "encrypted.txt.gpg" ""

 

Important

Robo-FTP has no way of knowing what the original embedded file name is. If you use this option, you must know in advance what the file name is if you intend to perform other actions on the resulting decrypted file from within the Robo-FTP script environment.

 

Related Command(s): PGPENCRYPT, PGPIMPORT