A
A
Artemy2019-11-20 15:58:21
Data conversion
Artemy, 2019-11-20 15:58:21

How do I convert hundreds of .SVGs to .AI without going crazy?

I am not familiar with vector graphics (so far). There is a bank of SVG images from the client. It needs to be converted to .AI so that After Effects can eat them.
How to do this by clicking several times, not a thousand?
I tried the converters that search engines offer - convertio distorts images, and from the rest (free) you need to download one at a time.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
RAX7, 2019-11-20
@RAX7

The script can

// file: convert_svg_to_ai.jsx

app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;

var inputDir = Folder.selectDialog("Input Dir?");
var outputDir = Folder.selectDialog("Output Dir?");
var files = inputDir.getFiles('*.svg');

var saveOpts = new IllustratorSaveOptions();
saveOpts.compressed = true;
saveOpts.embedICCProfile = true;
saveOpts.embedLinkedFiles = true;
saveOpts.pdfCompatible = true;

for (var f = 0; f < files.length; f++){
    var doc = app.open(files[f]);
    var newFile = new File(outputDir + '/' + doc.name);
    doc.saveAs(newFile, saveOpts);
    doc.close(SaveOptions.DONOTSAVECHANGES);
}

app.userInteractionLevel = UserInteractionLevel.DISPLAYALERTS;

save the code to a file convert_svg_to_ai.jsx, in illustrator choose file->scripts->other script and choose convert_svg_to_ai.jsx. In the first dialog box, you specify the folder where the svg files are located, in the second - where to save the .ai

U
U235U235, 2020-01-20
@U235U235

If you need to click, then AutoIt will help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question