Posted By

qrist0ph on 06/21/08


Tagged

sysadmin


Versions (?)

Subversion UnSvn


 / Published in: Visual Basic
 

  1. 'deletes all .svn folders
  2.  
  3. Set objFSO = CreateObject("Scripting.FileSystemObject")
  4. objStartFolder = Wscript.Arguments(0)
  5.  
  6. Set objFolder = objFSO.GetFolder(objStartFolder)
  7. 'Wscript.Echo objFolder.Path
  8. 'Set colFiles = objFolder.Files
  9. 'For Each objFile in colFiles
  10. ' Wscript.Echo objFile.Name
  11. 'Next
  12. 'Wscript.Echo
  13.  
  14. ShowSubfolders objFSO.GetFolder(objStartFolder)
  15.  
  16. Sub ShowSubFolders(Folder)
  17. For Each Subfolder in Folder.SubFolders
  18. 'Wscript.Echo Subfolder.Path
  19. Set objFolder = objFSO.GetFolder(Subfolder.Path)
  20. Set colFiles = objFolder.Files
  21. 'For Each objFile in colFiles
  22. ' Wscript.Echo objFile.Name
  23. 'Next
  24.  
  25. 'Wscript.Echo
  26.  
  27. if(instr(Subfolder.Path,".svn")) then
  28. 'Wscript.Echo Subfolder.Path
  29. objFSO.DeleteFolder Subfolder.Path,True
  30. else
  31. ShowSubFolders Subfolder
  32. end if
  33. Next
  34. End Sub

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: jeffld on September 19, 2008

I'm not sure why anyone would want to delete the .svn folder, but the snippet of code could be useful for other things.

Posted By: qrist0ph on October 15, 2008

wasnt aware of tortoieses export functcion, but its still nice for copying unless you have tortoise svn installed

You need to login to post a comment.