폴더 및 하위 폴더의 이미지 크기를 줄이는 스크립트가 있습니다. 그러나 일부 폴더를 제외하고 싶습니다.폴더를 제외하려면 이미지 크기 줄이기
나는 $source_listephotos = Get-ChildItem $source -Recurse | where {$_.FullName -notmatch $exclude_list}
이라는 매개 변수를 찾았지만 하나의 폴더 만 제외하고 여러 개를 제외 할 수 있습니다.
$source = "U:\TEST\Compression\images"
$exclude_list = @('Imprimerie')
$source_listephotos = Get-ChildItem $source -Recurse | where {$_.FullName -notmatch $exclude_list}
해결책이 있으십니까?
: 'IMPRIMERIE | Imprimerie1abc'를 ... 전체 이름은 전체 경로와 일치하기 때문 또한 내가 $ _ 이름에 일치하는 것이 좋습니다 것입니다.을. ps_container -eq $ true – Kiran
[Get-ChildItem의 항목 목록을 powershell에서 제외시키는 방법]의 가능한 복제본 (http://stackoverflow.com/questions/19207991/how-to) -exclude-list-of-items-from-childitem-result-in-powershell) –
도움을 주셔서 감사합니다 !! – pcarrey