Inject Wildcard

Post Reply
Mark Casey
Member
Posts: 24
Joined: Thu Sep 26, 2019 1:47 pm
Location: Leeds, UK

Inject Wildcard

Post by Mark Casey »

Hi All

I have a Excel file listing files name that I use in the flow with the 'Inject Wildcard' App
Example of Excel
UKG Product Code
539143-0-1
558754-0-1
728704-0-6
748583-0-1

I can find these file within the repository folder but sometimes there are files like:

728704-0-6_15_Insert.pdf

This is picked up instead of 728704-0-6_15.pdf (because its the newest file with the same name at the start)

I really need the 'Inject Wildcard' App to ignore any '_insert' files

Any ideas??

Thanks
Mark :roll:
laurentd
Member
Posts: 156
Joined: Wed Mar 13, 2019 2:06 pm

Re: Inject Wildcard

Post by laurentd »

Just add ".pdf" after the name filter, to compare with the complete file name.
Laurent De Wilde, Solution Architect @ Enfocus
Mark Casey
Member
Posts: 24
Joined: Thu Sep 26, 2019 1:47 pm
Location: Leeds, UK

Re: Inject Wildcard

Post by Mark Casey »

Hi Laurent

Cant do that, reason been, the files have a version number on the end

728704-0-6_15. - This has Version Number of _15

If I put the .pdf then it does not find the files that have the _1 or _10 or _15 etc

If I put [Job.NameProper]??.pdf, this will find the correct file as long as the Version Number is 1 digit (ie 1-9)

If I put [Job.NameProper]???.pdf, this will find the correct file as long as the Version Number is 2 digit (ie 10-99)

But I dont know what the version will be, just need a latest

So I need a solution that would find the all version which the App can then pick the newest file

Still no solution
Mark
laurentd
Member
Posts: 156
Joined: Wed Mar 13, 2019 2:06 pm

Re: Inject Wildcard

Post by laurentd »

You can use a regular expression for the file name, but then you can not use the [Job.NameProper] variable.
To get the latest version (based on date), use the time filter: Newest n job(s).
If you always have an _insert file next to the file you want to inject, and dates are the same (2 most recent files), just inject the 2 more recent files, and filter out the _insert file further in the flow.
Laurent De Wilde, Solution Architect @ Enfocus
jan_suhr
Advanced member
Posts: 687
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Inject Wildcard

Post by jan_suhr »

After the pickup you can have a folder with two outgoing connections to sort out the files that contain _Insert to a Recycle bin and the other connection will get the files you want.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
Mark Casey
Member
Posts: 24
Joined: Thu Sep 26, 2019 1:47 pm
Location: Leeds, UK

Re: Inject Wildcard

Post by Mark Casey »

Good idea with the Filter out after the Inject, should of thought of that

Slight problem, not all files have a _insert file
If I set the newest files to '2' then the other cards would bring in two versions, can there be filter to sort this?

:roll:
Mark Casey
Member
Posts: 24
Joined: Thu Sep 26, 2019 1:47 pm
Location: Leeds, UK

Re: Inject Wildcard

Post by Mark Casey »

Having amending the 'Amount of Jobs' on the Inject Wildcard I can can then Filter out the _insert files
Now this causes a extra issue, I get files through as below:
543085-0-1_1.pdf
543085-0-1_2.pdf
These are the Versions of the same Artwork
So how do I remove the older (lower version number) file and only allow the 543085-0-1_2.pdf to flow through?
sander
Advanced member
Posts: 308
Joined: Wed Oct 01, 2014 8:58 am
Location: Den Bosch

Re: Inject Wildcard

Post by sander »

This is not the most elegant way, but for Friday afternoon tinkering.. ;-)

Flow: https://fromsmash.com/_4AVVgUv~g-bt
Attachments
Mark.png
Mark.png (56.48 KiB) Viewed 20949 times
Mark Casey
Member
Posts: 24
Joined: Thu Sep 26, 2019 1:47 pm
Location: Leeds, UK

Re: Inject Wildcard

Post by Mark Casey »

Hello Sander
Thanks for your reply and example flow
Close to perfect but I have a small issue
We dont always have all the old versions in the repository
Example file
543085-0-1_1.pdf
543085-0-1_4.pdf
This then does not match the number of files so both are sent to lower folder
We need to somehow keep the Higher Version number
sander
Advanced member
Posts: 308
Joined: Wed Oct 01, 2014 8:58 am
Location: Den Bosch

Re: Inject Wildcard

Post by sander »

How about this.

1. We sort the files in the job with prefix count_
2. This is the output, a total of 6 files found.
3. Now we match the count with ungroup.NumFiles. If count equals ungroup.NumFiles than we got the highest number :)
M2.png
M2.png (76.9 KiB) Viewed 20841 times
Flow:
https://fromsmash.com/markflow
Mark Casey
Member
Posts: 24
Joined: Thu Sep 26, 2019 1:47 pm
Location: Leeds, UK

Re: Inject Wildcard

Post by Mark Casey »

Perfect, its works, just need to rename the file by removing the Count Prefix, works a treat

Thank you :D
Post Reply