Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. function Get-Build-Bin-Paths($Branch, $Chunk = "name")
  2. {
  3. $builds = (Get-ChildItem ("\\share\folder\" + $branch))
  4. $builds | % {
  5. $chunks = $_.GetDirectories();
  6. $chunks | % {
  7. if ($_.Name.Equals($Chunk))
  8. {
  9. $output = $_.GetDirectories();
  10. $output | % {
  11. if ($_.Name.Equals("bin"))
  12. {
  13. return ("\\share\folder\" + $branch + "\" + $_.Parent.Parent.Name + "\" + $_.Parent.Name + "\" + $_.Name)
  14. }
  15. }
  16. }
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement