Q: Treatment Error in PGP Decryption. I am writing a rule to decipher pgp files. Sometimes, I may have some error (ie. bad pgp key). In this case, I have the following error:
I would like in this case to move the file in an other directory (ie. FILE IN ERROR). Is it possible ?
A: Yes this is possible. We’ll use our Rule Events ‘On Error’ option. This event is triggered when an error occurs, in this case with the decryption in the Destination. We added some screenshots to get you started.
- Please open the ‘Rule Events’ setup:
- Enable ‘On Error’ and add and enable the following ‘Pascal Script’ (be sure ‘On Error’ is selected). Don’t forget to adjust the ctErrorPath const.
Const ctErrorPath = 'C:\Temp\'; // path must end with / Begin psExitCode:= 1; // ... add your code here psMoveFile(psFilePath + psFileName, ctErrorPath + psFileName); End.
In the meanwhile, I had found another solution using command on the event After Move Error. But I switched back to your solution.
If you need any info about this ‘Treatment Error in PGP Decryption’ question, please let us know.