web stats
Mirth Community - View Single Post - How to delete files that are sent to the destination ?
View Single Post
Old 07-17-2015, 07:22 AM
mbellio mbellio is offline
Mirth Newb
Join Date: May 2015
Posts: 6
mbellio is on a distinguished road

Here's a quick script I threw together in the post-processor.

var File = java.io.File;
if (FileUtil.deleteFile(new File($('FilePathAndName')))) {
    logger.error("File successfully deleted.");
else {
    logger.error("File could not be deleted.");
This should delete the file from the path and name given. The file path and name need to be put into a variable before the post-processor is run.
Reply With Quote