inkscape -T --export-type=eps file1.svg file2.svg fileN.svg ...
-T : Convert Text to Paths (optional but recomended)
--export-type=eps : Export to
inkscape --help for a list of other filetypes you can export to)
Protip: you can spesify multiple export formats! e.g.
Batch process an entire folder
find . -name "*.svg" -print0 | xargs -0 -P0 inkscape -T --export-type=eps
This is going to very very fast compared to the windows version becuse the
inkscape command can take
inksape file1 file2 file3 which
xargs will do by default.
This should also be paralizable, hence the
IDK if inkscape can nativly deal with globs in linux (it doesn't work in DOS) but if you have a modern shell it shouldn't matter, in which case you can just do:
inkscape -T --export-type=eps *.svg
For windows the fastest way to get an entire folder processed would be:
C:\my\work\folder\> forfiles /M "*.svg" /C "cmd /C inkscape -T --export-type=eps @name"
Protip: You can also use the /S switch on the
forfiles /S ... to traverse subdirectories in the work folder
Protip: You can use
/P C:\another\path like:
forfiles /P C:\another\path ... to work in a completly diffrent directory.
You can use
forfiles /? for more info.
This is slow.
It creates a process for Every. Single. File.
If you need speed, investigate a way to list out all the files in the directory in a arg compatible way.
arg1 arg2 arg3 "arg with space" arg5 argN
Full walk-through (Windows)
If you're a
non-IT/math-nerd this should walk you through setting up and running inkscape in the command line!
inkscape in the PATH?
First we need to see if your computer knows where to find the
inkscape program. Your computer knows where to find it by using a special global configuration variable (called the PATH variable) to know where to look for program binaries like inkscape.
I think inkscape is suppposed to add itself to the system PATH but it didn't do that for me so let's check it!
In yout windows start-menu start typeing
Click on the
Command Prompt application
This should open the CMD prompt window
inkscape --help and then press enter
You should see a big block of text that describes using
inkscape from the command line.
You can skip to the Open a command window in your working directory section
If you see:
'inkscape' is not recognized as an internal or external command,
operable program or batch file.
Inkscape is not in your PATH
Please follow the next section.
inkscape to your PATH
If inkscape is not in your PATH we need to add it so the comand prompter can find it.
Find out where inkscape is installed
In the start menu start typing
Right Click on the Inscape application and click on the "Open File Location"
You should see two shortcuts
Right click on the
Inkscape Shortcut and clck on "Open File Location"
Copy the directory
In the file explorer, click on the browser bar and copy the highlighted directory path
Add inkscape's application location to the path
Open the System Environment setting
In your start menu start typing
Click on the shortcut to "Edit System Environment Variables"
Clck on the "Environment Variable..." button
System Variables section find the PATH variable
Paste the directory from the previous section into the new item.
Please close any open CMD prompt windows (the PATH will not auto update)
Go back to the 'Is
inkscape in the PATH?' section
Open a command window in your working directory
Working in the command line is very powerfull but there are no safety gaurd rails. There is no Undo and there is no Recycle Bin. Things are permanant.
I recomend copying the folder with your work to a seprate folder and then running commands in that work folder.
I will be using
C:\workdir but you can use anywhere that is convenint for you.
Open a command window in your work folder.
In the file explorer (in your work folder), type
cmd and then enter in the browser bar.
Verify your command session is in the correct directory.
You should see something like this:
Run the commands
There we go!
You should now be set up to run the commands mentioned above.
If you only want to export certain files you can use this form:
inkscape -T --export-type=eps with all the files you'd like to convert.
inkscape -T --export-type=eps file1.svg file2.svg
Protip: you can press the TAB key at the end of the command to cycle through the files in the directory
If you want to export every file in the folder you can use:
forfiles /M "*.svg" /C "cmd /C inkscape -T --export-type=eps @name