Skip to main content
Participant
November 14, 2022
Answered

Change saving mode of hundreds of svg files

  • November 14, 2022
  • 2 replies
  • 416 views

Hello community, 

I created hundreds of icons and logos on Illustrator that I saved as SVG files. These files are giving some problems and for this reason I have to change an advanced option in the settings (CSS Properties > from "Style Attributes" to "Presentation attributes").
Do you know if exists any method to change and re-save all my SVG files in bulk?  Otherwise, I'll have to open each file and then change this advanced option one by one. 

This topic has been closed for replies.
Correct answer Anubhav M

Hello @ElisaVa,

 

Thanks for reaching out. I hope the suggestions shared by Doug helped resolve the problem. If not, kindly record an action for exporting your SVG in Presentation Mode and then use the Batch command to process the entire folder of SVGs which you want to have the same attribute for. You may learn more about this here: https://helpx.adobe.com/illustrator/using/automation-actions.html.

 

Feel free to reach out if you need further assistance. We'd be happy to help.

 

Thanks,

Anubhav

2 replies

Anubhav M
Community Manager
Anubhav MCommunity ManagerCorrect answer
Community Manager
November 14, 2022

Hello @ElisaVa,

 

Thanks for reaching out. I hope the suggestions shared by Doug helped resolve the problem. If not, kindly record an action for exporting your SVG in Presentation Mode and then use the Batch command to process the entire folder of SVGs which you want to have the same attribute for. You may learn more about this here: https://helpx.adobe.com/illustrator/using/automation-actions.html.

 

Feel free to reach out if you need further assistance. We'd be happy to help.

 

Thanks,

Anubhav

ElisaVaAuthor
Participant
November 15, 2022

Thank you! I didn't know about actions, but it worked!

Doug A Roberts
Community Expert
Community Expert
November 14, 2022

This change seems to be from inline CSS to attributes, i.e. style="fill:#00FF00;" becomes fill="#00FF00"

 

This SVG utility seems to perform that operation as part of a general cleanup process:

https://github.com/scour-project/scour

 

There's a script here that operates it on a specific folder, so you could batch process files:

https://gist.github.com/loganpowell/5ba8232145081cde94d65f20ee6cb0f1

 

This does appear to require a fair bit of setup (using Python etc.), but it may be worth it if this is a regular task.