Mobile app version of vmapp.org
Login or Join
Kevin459

: Export Multiple Artboards to Pngs Named after the Artboard Without the Filename Prepended Given the following setup: File: SomeFilename.ai Which contains artboards named: Artboard_01

@Kevin459

Posted in: #AdobeIllustrator #Artboard #Png

Given the following setup:


File: SomeFilename.ai


Which contains artboards named:



Artboard_01
Artboard_02
Artboard_03



At the moment if I export the artboards Illustrator insists on prepending the filename to the artboards. So the files generated would be named:



SomeFilename_Artboard_01.png
SomeFilename_Artboard_02.png
SomeFilename_Artboard_02.png



I would like them to be named:



Artboard_01.png
Artboard_02.png
Artboard_02.png



Obviously I know there are a multitude of options for batch renaming files, but this doesn't fit into my workflow. I do a lot of UI design (iOS or CSS) which involves creating a large number of graphics in Illustrator then exporting them. I often shoot back and forth rapidly between Xcode or a browser and Illustrator tweaking graphics. At the moment I can't just export and rebuild/refresh. I have to find the file and rename it before it will work. This is a major speed-bump.

10.05% popularity Vote Up Vote Down


Login to follow query

More posts by @Kevin459

5 Comments

Sorted by latest first Latest Oldest Best

 

@Reiling762

Why don't you just do a simple file rename of all your files in folder using command prompt after you've saved your PNGs?

ren "Prefix_*.png" "///////*.png


Mind that you have to type as many "/" as there are characters in your prefix (including underscore).


Note: This command can be executed on Windows OS in command prompt.

Subnote: I know this has been answered several times— I'm just adding this answer so others can use this super simple command instead of using complicated cmd scripts or batch files.

10% popularity Vote Up Vote Down


 

@Sarah814

I guess Marc Edwards' answer does the trick but if you want to stick to artboards instead of slices you can use this script that does exactly what you're looking for: www.ericson.net/content/2011/06/export-illustrator-layers-andor-artboards-as-pngs-and-pdfs/

10% popularity Vote Up Vote Down


 

@Ravi4787994

If you use slices in Illustrator, rather than artboards, you can specify exact file names for the export. Just set up a big single artboard and add all your elements as if you were building a sprite sheet, then use Save for Web to export everything in one pass.

Adobe Illustrator: Slices and image maps

Some other reasons to use slices over artboards:


Slices snap to the pixel grid. Artboards don't.
You can only have 100 artboards in a document. Slices don't have that limit.


For file renaming, I usually set up Automator workflows. You could even set up Automator workflows on a per project basis, so renaming and moving can happen with a single click, or even a folder action. In fact, you could probably add it as a build phase in Xcode?

I assume you'll need to rename your @2x files anyway, unless you have the artwork in Illustrator at both sizes?

Also, I'd be a little careful when using Illustrator for UI design work. Its shape antialiasing has some issues, and gradients can't be dithered. This means your artwork can be considerably lower standard than if you'd created it in Photoshop or Fireworks.

10% popularity Vote Up Vote Down


 

@Smith574

Just for fun, on Mac OS, open Terminal

cd folder


tips : you can drag in terminal window the target folder

ls


to list file and check if it's the good place

for f in *.png; do mv "$f" "${f/SomeFilename_/}"; done


look in Finder

10% popularity Vote Up Vote Down


 

@Jennifer810

You have Bridge, if you have Illustrator. Batch Rename is built into Bridge and will do that task for you quite easily after you've exported the art boards.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme