-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkill_bin_obj.bat
More file actions
39 lines (32 loc) · 1.12 KB
/
kill_bin_obj.bat
File metadata and controls
39 lines (32 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
:: TODO. Pass list of folders to clear as parameters. Default (Bin, Obj, _Bin).
:: TODO. Add list of folders to skip as parameters. Default (Libs, Packages).
:: TODO. List not processed folders on separate line.
@echo OFF
Setlocal EnableDelayedExpansion
for /f %%a in ('copy /Z "%~dpf0" nul') do set "CR=%%a"
echo Start bin and obj folders removing.
for /d /r . %%d in (bin,obj) do (
if exist "%%d" (
set currentDir=%%d
set leftTest=x!currentDir:\Libs\=!
set leftTest2=x!currentDir:\packages\=!
if "!leftTest!"=="x!currentDir!" (
if "!leftTest2!"=="x!currentDir!" (
call :spinner
rd /s /q "%%d"
)
)
)
)
:: Tribute to RRS.
echo Zzzzz ^|^\ ^_^,^,^,^-^-^,^,^_ +-----------------------------+
echo ^/^,^`^.^-^'^`^' ^.^_ ^\^-^;^;^,^_ ^| Process completed. ^|
echo ^|^,4^- ^) ^)^_ ^.^;^.^( ^`^'^-^' ^| Process any key to exit. ^|
echo ^'^-^-^-^'^'^(^_^/^.^_^)^-^'^(^_^\^_^) +-----------------------------+
pause > nul
exit /b
:spinner
set /a "spinner=(spinner + 1) %% 4"
set "spinChars=\|/-"
<nul set /p ".=Processing !spinChars:~%spinner%,1!!CR!"
exit /b