Sort out files with no corresponding XML

Post Reply
User avatar
Terkelsen
Advanced member
Posts: 300
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Sort out files with no corresponding XML

Post by Terkelsen »

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?
jan_suhr
Advanced member
Posts: 592
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Sort out files with no corresponding XML

Post by jan_suhr »

Snag_5021418.png
Snag_5021418.png (13.57 KiB) Viewed 15793 times
This could work for you.

You send the PDF and JPG files to a disc folder. The XML go to Inject job and one XML pass the Inject job so we can use it later.
Then the PDF or JPG get injected and meet the XML in folder 18 for the XML Pickup.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
jslater
Member
Posts: 23
Joined: Fri Oct 14, 2011 7:35 pm

Re: Sort out files with no corresponding XML

Post by jslater »

I was testing on a server running Switch2022 Fall, and recently updated all the apps, and it would appear they've added a traffic light connection to the XML Pickup app. What's odd is that it's not listed int he change log for the app update, nor in the documentation in the App Store. Anyway, something like that would probably be the easiest way to do what you're after.
Screen Shot 2023-11-21 at 13.12.45.png
Screen Shot 2023-11-21 at 13.12.45.png (51.42 KiB) Viewed 15786 times
User avatar
Terkelsen
Advanced member
Posts: 300
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Re: Sort out files with no corresponding XML

Post by Terkelsen »

@jslater, I wasn't aware of that change in the updated version of XML Pickup. That obviously solves the problem in the best possible way. Thanks for making me aware of that.

@Jan_suhr, I'm sure you were not aware of that either, but thanks for your suggestion anyway.
Post Reply