I have exe of cwebp that basically can be run like
cwebp.exe image1.jpg -o image1.webp
I'm trying to create simple powershell script to run the exe for all image inside a folder using powershell script, I do have create some script like this
param ( [string]$FolderName)
Get-ChildItem $FolderName | ForEach-Object {
&"D:\Downloads\libwebp\bin\cwebp.exe" $_.FullName -o $_.BaseName + ".webp"
}
so I can run the ps1 file with the folder name like
batch-script.ps1 ".\images"
but when I run it, got error
SHCreateStreamOnFile((const LPTSTR)filename, STGM_READ, stream) failed 80070002
Error opening input file .webp (80070002)
OpenInputStream(filename, &stream) failed 80070002
cannot open input file '.webp'
Error! Could not process file .webp
Error! Cannot read input picture file '.webp'
the folder content just have jpg image name image1.jpg, image2.jpg, did I miss something?