* Set folder paths SET put_decrypted_files_here = "c:\Uploads\Decrypted\" SET put_rejected_files_here = "c:\Uploads\Rejected\" * Enable Logging LOG "upload_event_script.log" * Detect failed upload IFNUM!= %event_uploadresult 0 GOTO move_rejects * Attempt PGP decryption ... PGPDECRYPT %event_uploadfile put_decrypted_files_here /pw="Secret" /signature=ignore IFERROR GOTO move_rejects * If we got to this line that means automatic PGP decryption worked * so we can get rid of the encrypted source file. DELETE %event_uploadfile RETURN %lasterror :move_rejects MOVE %event_uploadfile put_rejected_files_here