In powershell using imagemagick, how to convert image to a new path -
i want convert tif jpg placed in c:\data\
get-childitem -path $source -filter *.tif | %{ convert $_.fullname "c:\data\$($_.fullname -replace ".tif+$", ".jpg")" }
but not work.
however works - places converted file in same location original file
get-childitem -path $source -filter *.tif | %{ convert $_.fullname "$($_.fullname -replace ".tif+$", ".jpg")" }
you're messing destination path concatting c:\data
$_.fullname
try $_.name
property:
get-childitem -path $source -filter *.tif | %{ convert $_.fullname "c:\data\$($_.name -replace ".tif+$", ".jpg")" }
Comments
Post a Comment