I would like to mapping a file by using path as filtering. I want to find file with extension .py, but not include in some specific path. I've tried this way, but seems does not work.
$targetPath = "E:\TargetFolder"
$ignorePath = Get-Content -Path .\ignore_ls.txt
$getIgnoreList = Get-Content -Path .\ignore_ls.txt
foreach($list in $getIgnoreList){
$mapping = Get-ChildItem -Path $targetPath\*.py -Recurse -Filter $list
Write-Host "targetPath: $mapping"
}
Anyone can help me please. thank you so much