PGPDECRYPT Decrypt a PGP encrypted file |
Top Previous Next |
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
|