Tim

Footprints in the snow of a warped mind

PowerShell

Where to find me

Flickr Icon  Twitter Icon  Linked In Icon  FaceBook Icon  Windows Live Alerts Butterfly  RSS 2.0 

Tag Cloud

AJAX (4) ASP (6) ASP.Net (47) Error Reporting (4) Web Service (1) WSDL (1) Atlas (2) Business (74) Business Start-up Advice (25) Client (13) Expanding Your Business (17) C# (15) Canoeing (4) Canoe Racing (5) Cheshire Ring Race (5) Racing (2) Training (4) CIMA (1) Cisco (1) 7970G (1) CSS (3) dasBlog (4) DDD (1) Design (9) Icons (1) Development (11) General (39) Christmas (6) Fun and Games (11) Internet (22) Random (46) RX-8 (8) Home Cinema (2) Hosting (1) IIS (8) iPhone (1) JavaScript (2) Marketing (5) Email (1) Multipack (1) Networking (2) Nintendo (1) OS Commerce (1) Photography (1) PHP (1) PowerShell (1) Press Release (1) Productivity (2) Security (2) SEO (5) Server Maintenance (3) Server Management (8) Social Networking (1) Experiment (1) Software (9) Office (5) Visual Studio (11) Windows (4) Vista (1) SQL (1) SQL Server (13) Stored Procedure (1) Testing (1) The Site Doctor (102) Turnover Challenge (1) Twitter (1) Umbraco (15) 2009 (1) Web Development (50) WebDD (33) Wii (1)

Blog Archive

Search

<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910

Recent Comments

Blog Archive

Various Links

Blogs I Read

[Feed] Google Blog
Official Google Webmaster Central Blog
[Feed] Matt Cutts
Gadgets, Google, and SEO
[Feed] Ol' Deano's Blog
My mate Dean's blog on my space, equally as random as mine but not off on as much of a tangent!
[Feed] Sam's Blog
Sam is one of my younger brothers studying Product Design and Manufacture at Loughborough, this is his blog :) Enjoy!

Recent Tracks

last.fm - The Social Music Revolution

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

newtelligence dasBlog 2.2.8279.16125

Send mail to the author(s) Email Me (Tim Gaunt)

© 2010 Tim Gaunt.

Sign In

    # Saturday, July 05, 2008

    Deleting SVN directories with PowerShell

    Saturday, July 05, 2008 4:25:32 PM (GMT Daylight Time, UTC+01:00)

    I've been re-working our new SVN structures recently as I'm now starting to understand how it works but one of the issues I had was trying to move the files/folders from a previous SVN directory.

    PowerShell is great if you understand it (which I'm also learning) so I thought I would share this little script with you. It just loops through the files/folders and removes all those named _svn. I found this script from Wyatt Lyon Preul and he complained about the length of the script, but from what I can tell you can condense that down to:

    gci $folder -fil '_svn' -r -fo | ? {$_.psIsContainer} | ri -fo -r

    I'm not that great with PowerShell yet but I hope that helps someone :)

    WARNING: As ever, incase I'm wrong (it happens!) test that on a folder first that you don't worry about losing!