About Me

Training

Nothin But .Net Developer Bootcamp

Navigation

Search

Categories

On this page

Purge Subversion Files

Archive

Blogroll

 Agile Developer Venkat's Blog
 Ayende @ Blog
 B#
 Barry Gervin's Software Architecture Perspectives
 Boy Meets World
 Brad Abrams
 Canadian Developers
 Christopher Steen
 Claritude Software News
 Clemens Vasters: Enterprise Development and Alien Abductions
 Coding Horror
 Coding in an Igloo
 Dare Obasanjo aka Carnage4Life
 Darrell Norton's Blog [MVP]
 David Hayden [MVP C#]
 Don Box's Spoutlet
 Eric Gunnerson's C# Compendium
 EZWeb guy: Jeffrey Palermo [C# MVP]
 Fear and Loathing
 Generalities & Details: Adventures in the High-tech Underbelly
 Greg Young [MVP]
 Greg's Cool [Insert Clever Name] of the Day
 IanG on Tap
 Ingo Rammer's Weblog
 ISerializable - Roy Osherove's Blog
 James Kovacs' Weblog
 Jason Haley
 Jean-Luc David
 Jeremy D. Miller -- The Shade Tree Developer
 JetBrains .NET Tools Blog
 Jimmy Nilsson's weblog
 John Bristowe's Weblog
 John Papa [MVP C#]
 Jon Skeet's Coding Blog
 JonGalloway.ToString()
 Jump the Fence or Walk Around
 Lambda the Ultimate - Programming Languages Weblog
 Larkware News
 Lutz Roeder
 Marquee de Sells: Chris's insight outlet
 Martin Fowler's Bliki
 Mike Nichols - SonOfNun Technology
 MSDN Magazine - .NET Matters
 MSDN Magazine - All Articles
 OdeToCode Blogs
 Onion Blog
 Planet TW
 Raymond Lewallen [MVP]
 Rockford Lhotka
 RodMan's Corner
 Roger Johansson's blog
 Sahil Malik - blah.winsmarts.com
 Sam Gentile's Blog
 Scott Bellware [MVP]
 Scott Hanselman's Computer Zen
 ScottGu's Blog
 secretGeek
 Service Station, by Aaron Skonnard
 Signum sine tinnitu--by Guy Kawasaki
 Stephen Toub
 Steve Eichert's Blog
 Steven Rockarts
 The Blog Ride
 The Coding Hillbilly
 The Daily WTF
 TheServerSide.net: News
 Tim Gifford
 Vance Morrison's Weblog
 you've been HAACKED

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

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 500
This Year: 9
This Month: 1
This Week: 0
Comments: 1549

 Tuesday, December 23, 2008
Tuesday, December 23, 2008 12:49:07 PM (Mountain Standard Time, UTC-07:00) ( )

Often times when I am copying files between different subversion folders, I want to make sure that I copy them and place them in the new location while not keeping any of the subversion folders/files kicking around. In the past I had a system for doing this (mostly with some well placed keyboard shortcuts). Now that I am moving most of my automation tasks into powershell, I thought I would share this script with you:

param([string] $folder)
  if (($folder -eq $null) -or ([System.IO.Directory]::Exists($folder) -eq $false))
  {
    "usage: kill_subversion_files.ps1 [path_to_folder_to_purge_subversion_files_from]"
  }
  else
  {
    "Deleting all subversion files from $folder"
    get-childitem $folder -recurse -force -include *svn | remove-item -recurse -force
  }

I place this scripts (named kill_subversion_files.ps1) in my powershell path, then I can just open up a powershell prompt and type in:

kill_subversion_files [path_to_folder_to_remove_subversion_files_from]

Develop With Passion!!

Comments [10] | | #