OPTION EXPLICIT
Dim FSO, Folder, SubFolder, LogFile, DeletedCount
DeletedCount = 0
If MsgBox ("This will delete ALL of your subversion folders for this repository. Are you sure?", vbYesNo) = vbYes Then
	Set FSO = CreateObject("Scripting.FileSystemObject")
	Set LogFile = FSO.CreateTextFile("./svn-cleanup.txt")
	DoSvnDelete ("./")
	MsgBox(DeletedCount & " .svn file(s) were deleted. See log file for rundown.")
	Set FSO = Nothing
End If
Sub DoSVNDelete (Path)
	If FSO.FolderExists (Path) Then
		Set Folder = FSO.GetFolder(Path)
		If Folder.SubFolders.Count > 0 Then
			For Each SubFolder  In Folder.SubFolders
				If SubFolder.Name = ".svn" Then
					LogFile.WriteLine ("Deleted: " & Path & "\" & SubFolder.Name)
					SubFolder.Delete
					DeletedCount = DeletedCount + 1
				Else
					DoSVNDelete (SubFolder)
				End If
			Next
		End If
	End If
End Sub