File Mover Blog

May 25, 2022

Treatment Error in PGP Decryption

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:

Limagito File Mover Treatment 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:

Limagito File Mover Rule Events

  • 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.

Limagito File Mover Rule Events Pascal Script

Feedback customer:

In the meanwhile, I had found another solution using command on the event After Move Error. But I switched back to your solution.

 

#Filetransfer #Filemanagement

If you need any info about this ‘Treatment Error in PGP Decryption’ question, please let us know.

Best regards,

Limagito Team

By Limagito-Team Encryption Error , , , Share:
SEARCH