I want to store items in a var from a directory with duplicate names, but different extensions. For example: there are files with .jpg
and files with .webp
with the same BaseName. I would like to excludes those and only add the ones that don't have a similar .webp
twin.
Code I used to get all the files:
$images = Get-ChildItem $dir
I would like to store all the files that don't have a .webp
twin with the same BaseName in $images
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…