Subversion Rename using Powershell

I am working on an ASP.NET project that is hosted in subversion. I mainly use the command line client to work with things, but occasionally that doesn't easily get me where I need to be. I wanted to rename a page with it's codebehind, so I did the following:

get-childitem MyPage.aspx* | %{ svn rename $_ $($_.ToString() -replace 'MyPage', 'new-page') }
This isn't anything new for powershell veterans, but it is the first time I found the immensely useful 'replace' string operation.

Filed under  //  powershell  
Posted