Page 1 of 1
Inject Wildcard
Posted: Thu May 30, 2024 3:00 pm
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

Re: Inject Wildcard
Posted: Thu May 30, 2024 3:28 pm
by laurentd
Just add ".pdf" after the name filter, to compare with the complete file name.
Re: Inject Wildcard
Posted: Thu May 30, 2024 4:08 pm
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
Re: Inject Wildcard
Posted: Thu May 30, 2024 4:31 pm
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.
Re: Inject Wildcard
Posted: Thu May 30, 2024 4:59 pm
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.
Re: Inject Wildcard
Posted: Thu May 30, 2024 5:52 pm
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?

Re: Inject Wildcard
Posted: Fri May 31, 2024 11:40 am
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?
Re: Inject Wildcard
Posted: Fri May 31, 2024 2:54 pm
by sander
This is not the most elegant way, but for Friday afternoon tinkering..
Flow:
https://fromsmash.com/_4AVVgUv~g-bt
Re: Inject Wildcard
Posted: Mon Jun 03, 2024 11:28 am
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
Re: Inject Wildcard
Posted: Mon Jun 03, 2024 4:39 pm
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 (76.9 KiB) Viewed 21138 times
Flow:
https://fromsmash.com/markflow
Re: Inject Wildcard
Posted: Wed Jun 05, 2024 12:38 pm
by Mark Casey
Perfect, its works, just need to rename the file by removing the Count Prefix, works a treat
Thank you
