Needed to convert several SVGs to PNG, and discovered the free Inkscape easily can be used in batch scripts.
The following .bat file will convert all SVGs dropped on it to a PNG with height 48 placed next to the original SVG. More options can be found in the Inkscape manual.
@echo off
for %%f in (%*) do (
echo %%~f
"C:\Program Files\Inkscape\inkscape.exe" ^
-z ^
--export-background-opacity=0 ^
--export-height=48 ^
--export-png="
%%~dpnf.png" ^
--file="
%%~f"
)
Tried to find out how to convert windows-1252 code files to utf-8 without messing up Norwegian characters today. Couldn’t really find anything good other than linux tools and php stuff. Finally, *facepalm*, I remembered it might be possible using Notepad… And sure enough, seems to work great. Just open up the windows-1252 encoded file in Notepad, then choose ‘Save as’ and set encoding to UTF-8.
Hopefully I won’t forget this the next time I need it… *sigh*
With a hint of Social Ineptitude