Guest User

Untitled

a guest
Jun 13th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. function GetFiles($path = $pwd, [string[]]$exclude)
  2. {
  3. foreach ($item in Get-ChildItem -Force $path)
  4. {
  5. if ($exclude | Where {$item -like $_}) { continue }
  6.  
  7. if (Test-Path $item.FullName -PathType Container)
  8. {
  9. $item
  10. GetFiles $item.FullName $exclude
  11. }
  12. else
  13. {
  14. $item
  15. }
  16. }
  17. }
Add Comment
Please, Sign In to add comment