-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathclean.bat
67 lines (51 loc) · 1.29 KB
/
clean.bat
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@echo off
::--------------------------------------------------------------------------
:: Copyright (c) 2012, Cesar Romero
:: All rights reserved.
:: License info: read license.txt
::--------------------------------------------------------------------------
:config
set F,0=*.bak
set F,1=*.dcu
set F,2=*.ddp
set F,3=*.~*
set F,4=*.local
set F,5=*.identcache
set F,6=*.tvsconfig
set D,0=Framework\__history
set D,1=Framework\Output\Win32\Debug
set D,2=Framework\Output\Win32\Release
set DELETE_FILE=del
set DELETE_FILE_PARAMS=/f /q /s >nul 2>&1
set DELETE_DIR=rd
set DELETE_DIR_PARAMS=/s/q
:resourcestring
set SProcessingFiles=Cleaning files, please wait...
set SProcessingDirectories=Removing directories, please wait...
set SInputProcessDone="Type <Enter> to close..."
:begin
cls
:process_files
echo.
echo %SProcessingFiles%
echo.
for /f "usebackq delims==, tokens=1-3" %%i in (`set F`) do (
if not "%%k"=="" (
%DELETE_FILE% %%k %DELETE_FILE_PARAMS%
)
)
:process_directories
echo.
echo %SProcessingDirectories%
echo.
for /f "usebackq delims==, tokens=1-3" %%i in (`set D`) do (
if not "%%k"=="" (
if exist %%k (
echo "%%k"...
%DELETE_DIR% %%k %DELETE_DIR_PARAMS%
)
)
)
:end
echo.
set /P USER_INPUT=%SInputProcessDone%