Batch convert SVG to SVGZ

View: New views
2 Messages — Rating Filter:   Alert me  

Batch convert SVG to SVGZ

by FunkyBee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

I'v got a load of SVG files and I want to batch convert them to SVGZ. I know Illustrator can do that job with the content of an entire folder. In this batch converter you can select 'Including all subdirectorys". But the resulting batch is that all converted files are stored in one folder.
My SVG stock is stored in a huge directory structure with a lot of folders and subfolders and my intent is to keep that structure after conversion.
 
So my question is: Is there software that can batch convert SVG files to SVGZ files with respect to the directory structure?

Greetz,
FunkyBee

Parent Message unknown Re: Batch convert SVG to SVGZ

by Dr. Olaf Hoffmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi again,

there is no need for a special software.
For example on Unix/Linux you can do it
with any shell (command line, konsole).
The compression with gzip is very simple
and should be installed on any (Unix/Linux)
system by default.

For example the command

gzip -S z ./examples/*/*.svg

compresses all files with filenames
ending on '.svg' in all subdirectories
of the subdirectory 'example' in the
current directory and adds a 'z' to the
end of the filename.

With an additional option -r the
compression can be done recursively
for any subdirectory in a directory structure.

If you use another operating system
without gzip or command line capabilities,
maybe you payed too much for it ;o)