【发布时间】:2016-07-11 21:28:14
【问题描述】:
我想将文件夹 C:\Users\Eric\Desktop\svg 中的多个 SVG 文件转换为名称为 [SVG File Name].svg.png 的 512x512 PNG 文件。
我尝试了以下命令:
for /f %f in ('dir /b "C:\Users\Eric\Desktop\svg"') do inkscape -z -e %f.png -w 512 -h 512 %f
命令行正确检测 SVG 文件并遍历它们,但 Inkscape 显示如下:
C:\Users\Eric\Desktop\inkscape>inkscape -z -e [SVG File Name].svg.png -w 512 -h 512 [SVG File Name].svg
** (inkscape.exe:8412): WARNING **: Can't open file: [SVG File Name].svg (doesn't exist)
** (inkscape.exe:8412): WARNING **: Can't open file: [SVG File Name].svg (doesn't exist)
** (inkscape.exe:8412): WARNING **: Specified document [SVG File Name].svg cannot be opened (does not exist or not a valid SVG file)
我在正常的 Inkscape 程序中打开了一个文件,它可以工作。
【问题讨论】:
-
使用的绝对路径。
-
@zengr:据我所知,在 Inkscape 0.92.4 中,绝对路径也会发生这种情况。