Loop through a set of files to find the good vs corrupt ones
I have and NPrinting job that generates several pdf files and delivers them to a folder. Once in a blue moon a pdf will have "_[FAILED]_" in the file name and the pdf is basically corrupt and won't open.
If it is possible, I'd like some scripting help on how I could loop through this set of files and
1) find the ones that are not "failed" (this I have figured out)
2) find the ones that are "failed" (I cannot seem to get this work because the file functions don't seem to execute on a corrupt pdf file)
Then once I have this info, I can leverage it in an NPrinting report that I will email myself as a means of notification that I need to address that pdf (which entails running my report for that particular pdf scenario via On Demand so I will have a successful pdf to replace the failed one).
Loading from a pdf-file isn't possible because it's not a data-file. Further your logic may miss appropriate brackets around the path in the case that there any spaces or other special chars - means something like: [$(file)]. In the case that there are various file-types included from your file-pattern you need to consider it within the file-format statement.