Is there a way to dynamically use the document name in export?

For instance, I have artboards named Square, Horizontal, and Vertical, in a document named Design. When exporting, I'd like filenames to be Design %ArtboardName%. Or, is there a way to mass change artboard names?

1 Answer 1


Dynamic naming while exporting might be a little complicated: I believe you'll need to create the whole exporter as a script this way. However mass change artboards names is super easy with scripting. For example this one will change all artboards of the document to DocumentName ArtBoardName

var docName = activeDocument.name.replace(/\.[^.]+$/g, ""); // getting the active document name without an extension
var i;

//for each top-level layer set (an artboard or a group)
for (i = 0; i < activeDocument.layerSets.length; i++) {
    //rename it to docName layerSetName
    activeDocument.layerSets[i].name = docName + " " + activeDocument.layerSets[i].name;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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