We Recommend

Visual Basic 2008 Programmer's Reference Visual Basic 2008 Programmer's Reference
Visual Basic Orcas Programmer's Reference is a language tutorial and a reference guide to the upcoming Orcas release of Visual Basic. The tutorial provides basic material suitable for beginners but also includes in-depth content for more advanced developers.


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 

You need to login to post a comment.