使用Windows 10 PowerShell批量调整目录中所有图像的大小
是否可以使用Windows 10 PowerShell命令批量调整文件夹中所有图像的大小使用Windows 10 PowerShell批量调整目录中所有图像的大小,powershell,Powershell,是否可以使用Windows 10 PowerShell命令批量调整文件夹中所有图像的大小 $path = "D:/imgs/Nature" #target directory [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") Get-ChildItem -Recurse ($path) -Include @("*.png", "*.jpg&
$path = "D:/imgs/Nature" #target directory
[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
Get-ChildItem -Recurse ($path) -Include @("*.png", "*.jpg") | ForEach-Object {
$image = [System.Drawing.Image]::FromFile($_)
}
为什么不改用呢?脚本库中有几个脚本可以执行此操作。试着去做,然后把不起作用的贴出来。哇!这很有帮助!为什么不改用呢?脚本库中有几个脚本可以执行此操作。试着去做,然后把不起作用的贴出来。哇!这很有帮助!