Topic Options
#22708 - 12/29/09 03:38 PM Compare Filenames
LadyZ Offline
Junior Member

Registered: 12/23/09
Posts: 5
Loc: Maryland
We have a customer receipt that we are currently printing with PlanetPress. We want to add PDF files to the print job based on products in the customer's order. Each order could potentially have multiple PDF attachments, or it could have none. There are hundreds of PDF files for the various products, so we don't really want to attach them all as PostScripts and then filter them out at print time.

So we're looking at having Cold Fusion drop copies of the PDFs for a given order into a folder for Watch to pick up. The PDF file names would contain the customer order number. I've added a branch to our watch process to check the PDF folder, but I'm not sure how I can get Watch to compare the order number from the original datastream (or its filename) with the PDF filenames to grab the right files to print with the receipt.

Suggestions or direction greatly appreciated.

Top
#22709 - 12/30/09 04:06 PM Re: Compare Filenames
Anonymous
Unregistered


Good day LadyZ

If the PDF file name indeed contains the customer number, you could use a job info variable to capture the customer number from the data and then use this variable in the needed action.

For example: If you set your job info %9 to point towards a data selection that returns the customer number, you can then use it in a folder capture for example and set the mask to "%9.pdf" or "%9*.pdf" if the PDF's name contains more than just the customer order number.

Let me know if this is understandable. Feel free to add additional information if you need to clarify.

Best regards,

Matt

Top
#22710 - 01/04/10 03:48 PM Re: Compare Filenames
LadyZ Offline
Junior Member

Registered: 12/23/09
Posts: 5
Loc: Maryland
I tried using the Job Info Variables. But there doesn't seem to be much documentation on exactly how to use them. I'm sorry if this is a dumb question, but what is the syntax for use in the job info field? The order number (3061234 for this example) is found on line 1, column 4 of the datastream, and is 7 digits long. The sample file name I'm trying to pick up is "3061234_MethCIS.PDF". My Folder Capture mask is set to "%9_*.pdf". I tried putting "@(1,4,7)" and then "=@(1,4,7)" in Job Info #9, but Watch gave me errors during debug:

Starting plugin Folder Capture - 15:43:01
Input path: C:\planet-press\input_attach
Parsed path: C:\planet-press\input_attach
Mask: %9_*.pdf
W3000 : Error parsing: Catastrophic failure
Folder Capture: W1603 : Plugin failed

I'm hoping my problem is just a syntax error.

Top
#22711 - 01/05/10 09:19 AM Re: Compare Filenames
Anonymous
Unregistered


LadyZ,

The W3000 error is not one that should ever be encountered, and even if the mask you entered should be valid, there seems to be something odd going on.

However, I have to advise you that PlanetPress 5 is now out of support scope, only version 6 and 7 are now supported so my first advice, honestly, would be to update to one of those supported version. This will achieve the dual goal of getting you up to date on our software and to most likely resolve this issue, as plenty of fixes were applied (and features added) to PlanetPress since version 5.

Hope this helps,
Eric.

Top
#22712 - 01/05/10 04:33 PM Re: Compare Filenames
LadyZ Offline
Junior Member

Registered: 12/23/09
Posts: 5
Loc: Maryland
It does not surprise me that I somehow found a way to turn a simple Watch process into catastrophic failure smile

I've spoken to my IT team about upgrading. Hopefully this will make things easier. Thank you both for your assistance.

Top