Sample scripts are provided as-is with no warranty of fitness for a particular purpose. These scripts are solely intended to demonstrate techniques for accomplishing common tasks. Additional script logic and error-handling may need to be added to achieve the desired results in your specific environment.
Log onto an FTP site, receive a specific file, and decrypt to a text file. This script also demonstrates some techniques for issuing error handling commands.
1 ;; 2 ;; Logon to FTP site 3 ;; 4 FTPLOGON "MySite" 5 IFERROR RETURN 6 ;; 7 ;; Receive encrypted file from FTP site 8 ;; 9 RCVFILE "encryptedfile.gpg" 10 IFERROR RETURN 11 ;; 12 ;; Decrypt received file 13 ;; 14 PGPDECRYPT "encryptedfile.gpg" "decryptedfile.txt" /pw=keypassphrase 15 IFERROR RETURN