Clean.bat 820 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. @echo off
  2. setlocal
  3. set "targetFolder=%~dp0"
  4. call :DeleteFolders ".\Examples"
  5. call :DeleteFolders ".\Output"
  6. call :DeleteFolders ".\.vs"
  7. echo Cleanup complete!
  8. pause
  9. exit
  10. :DeleteFolders
  11. for /d %%i in ("%1*") do (
  12. if /i "%%~nxi"=="obj" (
  13. echo Deleting folder "%%i"
  14. rd /s /q "%%i"
  15. ) else (
  16. if /i "%%~nxi"=="bin" (
  17. echo Deleting folder "%%i"
  18. rd /s /q "%%i"
  19. ) else (
  20. if /i "%%~nxi"=="Output" (
  21. echo Deleting folder "%%i"
  22. rd /s /q "%%i"
  23. ) else (
  24. if /i "%%~nxi"==".vs" (
  25. echo Deleting folder "%%i"
  26. rd /s /q "%%i"
  27. ) else (
  28. call :DeleteFolders "%%i\"
  29. )
  30. )
  31. )
  32. )
  33. )
  34. exit /b