I have a script that reduces the size of images in folders and subfolders. However, I would like to exclude some of the folders.
I have find the parameter $source_listephotos = Get-ChildItem $source -Recurse | where {$_.FullName -notmatch $exclude_list}
but it allows exclude one folder and not several.
$source = "U:\TEST\Compression\images"
$exclude_list = @('Imprimerie')
$source_listephotos = Get-ChildItem $source -Recurse | where {$_.FullName -notmatch $exclude_list}
Do you have a solution ?