This script automates the conversion of .eps files to .svg format using Ghostscript and Inkscape.
It will scan all .eps files in the current folder and its subfolders, convert them to .pdf (using Ghostscript), then convert the .pdf to .svg (using Inkscape).
Once a file is successfully converted, the .pdf file is deleted and the original .eps file is renamed by appending (done) to its name.
- Batch convert
.epsfiles to.svg. - Recursively processes subfolders.
- Deletes
.pdffiles after conversion. - Renames
.epsfiles tofilename(done).epsafter successful conversion.
-
Ghostscript
Download & install: https://www.ghostscript.com/download/gsdnld.html -
Inkscape
Download & install: https://inkscape.org/release/ -
Environment Variables
Add Ghostscript and Inkscapebinpaths to your system’sPATH.
-
Place
eps_to_svg.pyin your target folder. -
Open Command Prompt or Terminal in that folder.
-
Run:
python eps_to_svg.py