Prefer one file over another

Post Reply
web3dprint
Newbie
Posts: 8
Joined: Fri Feb 26, 2016 5:04 pm

Prefer one file over another

Post by web3dprint »

We're stuck trying to find a solution to this problem: at some point in our flow, as input we receive many job files, we group them by a string in their name (which is our internal job name) and often one job has a standard file, other times it can also have a file with a "_VDP" in the file name. We would like to proceed with only one of them, in the case of files with "_VDP" it should be that, otherwise it should fallback to the file without "_VDP".

I tried sorting the job files with a search pattern looking for "_VDP", but then I cannot filter on the output looking at the prefix via regex because it's not always 00001_, it's an incremental number between jobs.

Basically I'd like to take only the first file, or as described above the one with "_VDP" in it.
Any ideas? We don't have the Scripting Module, btw.
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Prefer one file over another

Post by gabrielp »

If the files are assembled into a folder, there is a Switch variable that displays all of the files in a job directory. I forget the name. But you could search on that for _VDP, and if it exists, route it to a path that knows to look for that file. Otherwise, route it elsewhere.
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Post Reply