Sort out files with no corresponding XML
Posted: Tue Nov 21, 2023 3:39 pm
I have a folder coming into a flow. The folder contains some JPG and PDF files and some corresponding XML files. I'm going to pick up the XML files using the pickup mode "Metadata alongside asset" since all XML-files will have a corresponding JPG or PDF with the exact same name (except for the extension). However, not all JPG and PDF files have a corresponding XML file and I want to just delete the files that have no corresponding XML.
The XML Pickup element will send these files to the Problem Jobs folder when the Orphan timeout is reached but I would rather sort these files out and send them directly to the Recycle bin.
I have set the Orphan time out to 40 minutes and then use "File pool cleanup" to look in that folder every 15 minutes and delete files older than 30 minutes. I works but feels like a very clumsy way to obtain what I want.
Any ideas on how to sort out all JPG and PDF files that does not have an equally named XML in the same folder?
The XML Pickup element will send these files to the Problem Jobs folder when the Orphan timeout is reached but I would rather sort these files out and send them directly to the Recycle bin.
I have set the Orphan time out to 40 minutes and then use "File pool cleanup" to look in that folder every 15 minutes and delete files older than 30 minutes. I works but feels like a very clumsy way to obtain what I want.
Any ideas on how to sort out all JPG and PDF files that does not have an equally named XML in the same folder?