STEP 1: Make the BAT File
Copy the following text into a text editor, like notepad. Save the text as InkscapeSVG2PNG.BAT.
@ECHO OFF
SET INKSCAPE="C:\Program Files (x86)\Inkscape\inkscape.exe"
FOR %%i IN (%1) DO IF EXIST %%~si\NUL GOTO PROCDIR
:PROCFILE
%INKSCAPE% -f %1 -e "%1.png" -w 128; done
GOTO END
:PROCDIR
ECHO Processing directory...
cd %1
for /R %1 %%i in (*.svg) do (ECHO %%i & %INKSCAPE% -f "%%i" -e "%%i.png" -w 128; done)
:END
pause
NOTE: You may have to edit the SET INKSCAPE line to reflect the path Inkscape is installed in.
STEP 2:Make the BAT File Easily Used (no command line junk)
One of my favorite things in Windows is the "Send To" folder, it makes it easy to use complicated scripts by just right clicking on files or directories and Sending To the script for processing. Depending on the version of Windows you are using, the Send To directory may be in different places;
Windows 2000, Windows XP
C:\Documents and Settings\<username>\SendTo
Windows Vista, Windows 7
C:\Users\<username>\AppData\Roaming\Microsoft\Windows\SendTo
Once you locate this directory (must be done for each user), simply create a shortcut to the InkscapeSVG2PNG.BAT file by right-clicking in the directory and selecting "New/Shortcut".
STEP 3: Use It!
You can now simply right-click on any file or directory, select "Send To/InkscapeSVG2PNG".
Viola! now you can easily scan through your files without having to open each SVG to see whats in it.
No comments:
Post a Comment