Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetFiles($path = $pwd, [string[]]$exclude)
- {
- foreach ($item in Get-ChildItem -Force $path)
- {
- if ($exclude | Where {$item -like $_}) { continue }
- if (Test-Path $item.FullName -PathType Container)
- {
- $item
- GetFiles $item.FullName $exclude
- }
- else
- {
- $item
- }
- }
- }
Add Comment
Please, Sign In to add comment