$inputDirectory = "inPath" | |
$outputDirectory = "outPath" | |
if (-not (Test-Path -Path $outputDirectory)) { | |
New-Item -ItemType Directory -Path $outputDirectory | |
} | |
Get-ChildItem -Path $inputDirectory -Filter *.svg | ForEach-Object { | |
$inputFilePath = $_.FullName | |
$outputFilePath = Join-Path -Path $outputDirectory -ChildPath ($_.BaseName + ".png") | |
& 'C:\Program Files\Inkscape\bin\inkscape.exe' ` | |
--export-type="png" ` | |
--export-filename="$outputFilePath" ` | |
--export-dpi=800 ` | |
$inputFilePath | |
} | |