回复 5# idwma
可是下面这个, 图片为什么没有保存到CD转到的目录?- #@&cls&powershell "type '%~0'|out-string|iex"&pause&exit
-
- [void][Reflection.Assembly]::LoadWithPartialName('System.Drawing')
- cd "C:\Users\Administrator\Desktop\新建文件夹"
- dir *.bmp |
- foreach{
- $image = [Drawing.Image]::FromFile($_.FullName)
- #$image.Save($($_.BaseName + '.jpg'), [Drawing.Imaging.ImageFormat]::Jpeg)
- $s=$_.BaseName
- $image.Save("$s.jpg", [Drawing.Imaging.ImageFormat]::Jpeg)
- $image.Dispose()
- }
复制代码
|