$FindJobpros = Get-ChildItem -Name "$OpJob_Path\*\*.pro\" ForEach ($FindJobpro in $FindJobpros) { $SubFile = $FindJobpros.Substring(7, 35) $GetDupFile = Get-ChildItem -Path $OpJob_Path\*\*.que | Where-Object {$_.Name -Match "$SubFile"} Remove-Item $GetDupFile } }
-Confirm:$false
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)