Sidebar

Process 0KB files and send an email alert with the same file attached.

0 votes
131 views
asked May 29, 2023 by soumya-suman-a-3307 (120 points)
Vendor wants to not to delete the 0KB/empty files,  Instead Archive as normal and send email alert attaching the same file.

1 Answer

0 votes

You could do this with a preprocessing script and something like qie.writeFile() and/or qie.sendEmail().  By setting the source node to only run the preprocessing script when messages fail to parse, you could limit which files where written out to the archive folder to just those files that are invalid for what the channel source is set to process.  Utilizing an if statement within the preprocessing script, you can limit yourself to just zero-length files.

answered May 30, 2023 by jon-t-7005 (7,590 points)
commented Jun 2, 2023 by soumya-suman-a-3307 (120 points)
This preprocessor script didn't work on the channel. I can see a message generated stating "Channel 'XYZ' found a zero byte file: C:\\sourcefolder\\xyz.csv, this file has been deleted." And then it simply deleted the file without moving into the specified folder in script.
...