0
4

1 回答 1

0

Try this:

Function ListFiles($Path,$Exclude)
{
    Get-ChildItem -Path $FilesToList -Force -Recurse  | 
    Where-Object {!$_.PSIsContainer -and $_.Extension -notmatch ($Exclude -join '|') }
}

Listfiles -Pathc:\tools –Exclude avi,txt,bmp
于 2012-07-16T08:41:16.340 回答