2017-02-20 56 views

回答

3
Get-ChildItem "yourpath" -file -recurse | where {-not $_.extension} | Remove-Item -WhatIf 

注意:删除应用行动-whatif。 -file将只列出文件而不是文件夹

get-childitem中使用include将限制范围仅限于该扩展名。