Friday, June 20, 2008

Powershell: Find .svn folders

How do you find all .svn folders under the current folder? The main challenge I had was that the .svn folder did not show up in any variation of Get-ChildIem call I was trying until I found that the -force switch is needed to show hidden files.

The call is as follows:

Get-ChildItem -recurse -force | Where-Object { $_.PsIsContainer -and $_.Name -match ".svn" } | select fullname

No comments: