daily pastebin goal
57%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top