Is there a way to make an Illustrator script run over all files in a certain folder and perform operations on these?

I am using CS5 on mac.

| improve this question | | | | |
  • What exactly are you trying to do? Also, please indicate what version illustrator you are using. You should look into Batch/Actions for Illustrator. If you can explain what you are doing you could script a process in a shell script per ImageMagick or similar. – DᴀʀᴛʜVᴀᴅᴇʀ Mar 14 '13 at 15:26

There are different ways to achieve what you're after. You just have to decide what works best for your workflow/platform.

  1. Have the script assign all *.ai files in a given directory to an array, then loop through.
  2. If you're on OS X, set up an AppleScript droplet that will do the same as option 1 for any directory dropped on it.
  3. Create a file prompt at the start of the script with multiple select enabled. This can be done with AppleScript, but I'm not sure about js.
  4. Not exactly what you described but, the script could assign all open docs to an array. This way you wouldn't be limited by directory.
| improve this answer | | | | |
  • 2
    5. make a script that acts upon and then closes an open file; create an action that runs the script; batch the action on a folder – horatio Mar 14 '13 at 20:03
  • @horatio sounds like a good alternate answer – user56reinstatemonica8 Mar 16 '13 at 14:30
  • Thanks - ended up using #1 which worked well! Only issue I stumbled on was that I had to replace 'file://' with '/' on Mac Mountain Lion for the folder path – LK__ Apr 2 '13 at 4:29
  • Yeah, file:// is a URL, you need the POSIX path for this purpose. – plainclothes Apr 2 '13 at 23:23
  • So how exactly do I modify an existing script to: Have the script assign all *.ai files in a given directory to an array, then loop through? – conceptoftheday Apr 28 '14 at 3:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.