Page 1 of 1

Compare AI file name to Folder Name (Job)

Posted: Fri Aug 27, 2021 10:51 pm
by larissas
I'm trying to setup a Condition with Variables that checks to see if the folder name matches the AI file name within. This is being setup on a connection to route the files one way if it does and another way (that involves delays) if it doesn't. If the files are supplied correctly, there's no reason to waste time sending them through that other part of the workflow.

It was suggested to me to use Job.NestedName, and select Before .ai. However, that result includes ALL the semicolons that separate each file. Adding After ; results in ONLY the semicolons. I've tried using a RegExp “[^;]*[A-Za-z?0-9?\s?]{1,}\.ai” but the "not" function isn't working as I expected. Does anyone know how to ignore those semicolons?

Re: Compare AI file name to Folder Name (Job)

Posted: Mon Aug 30, 2021 8:22 am
by freddyp
[Job.NestedName] - Contains - [Job.Name].ai

Re: Compare AI file name to Folder Name (Job)

Posted: Fri Sep 03, 2021 10:30 pm
by larissas
This will work for an InDesign file/package! Thanks!

However, this doesn't quite work for an Illustrator package because, when saved the way Illustrator automatically does it, the folder name also has "_Folder" at the end. How can I incorporate that?

To be clear, the folder name would be:
Brownie_Wrapper_1oz_Folder

Whereas the .ai file inside would be:
Brownie_Wrapper_1oz.ai

The way this is configured, if I'm understanding it correctly, would result in a match only if the .ai file was called:
Brownie_Wrapper_1oz_Folder.ai
But that's not what AI does by default when creating a package.

I need to be able to isolate a specific nested name without the extension so I can add the "_Folder" to the comparison.

Re: Compare AI file name to Folder Name (Job)

Posted: Mon Sep 06, 2021 8:43 am
by freddyp
There are two possible approaches: rename the job folder first by removing _Folder, or in the condition you define the right-hand variable as:
[Job.NameProper:Before="_Folder"].ai

Re: Compare AI file name to Folder Name (Job)

Posted: Tue Sep 07, 2021 3:33 pm
by larissas
EDIT: So, I tried this and it seems like it should work, but it's not. It's putting any folder with a .ai in that route. I don't want to do the option of renaming anything because the whole point of this router is to avoid messing with a package that has been supplied correctly. If the customer did what they were supposed to do, I want it to just make a pdf and go to the preflight. Otherwise, it goes through a series of other actions to make it right, but that takes time.

[Job.NestedName] Contains [Job.NameProper:Before="_Folder"].ai

I also tried it setting the space to "norm," just in case that was throwing it off.
I tried switching the "Contains" to other things and none of them give the correct result.

Re: Compare AI file name to Folder Name (Job)

Posted: Wed Sep 08, 2021 6:39 pm
by larissas
Nevermind, I added another condition and it's all working now!