I would like to find all directories at the top level from the location of the script that are stored in subversion.
In C# it would be something like this
I ended up doing it with a count:
$directoryContainsSvn = { (Get-ChildItem $_.Name -force | ? {$_.PsIsContainer -and $_.Name -eq "_svn" -or $_.Name -eq ".svn"} | Measure-Object).Count -eq 1 } $svnDirs = Get-ChildItem | ? {$_.PsIsContainer} | ? $directoryContainsSvn