-
Notifications
You must be signed in to change notification settings - Fork 0
/
cleanup-single.bat
44 lines (32 loc) · 986 Bytes
/
cleanup-single.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
@ECHO OFF
echo Unreal Cleanup Script
echo Client directory: %~dp0
pushd "%~dp0"
@RD /S /Q "Intermediate"
@RD /S /Q "Binaries"
@RD /S /Q "DerivedDataCache"
:: Deletes saved source control settings @RD /S /Q "Saved"
del /S *.sln
:choice
set /P c=Clean plugins as well?[Y/N]? (default = no)
if /I "%c%" EQU "Y" goto :plugins
if /I "%c%" EQU "N" goto :cleaned
if /I "%c%" EQU "" goto :cleaned
goto :choice
:plugins
for /d %%a in (
"Plugins\*"
) do if exist "%%~fa\Intermediate\" rmdir /s /q "%%~fa\Intermediate" do if exist "%%~fa\Binaries\" rmdir /s /q "%%~fa\Binaries"
for /d %%a in (
"Plugins\Developer\*"
) do if exist "%%~fa\Intermediate\" rmdir /s /q "%%~fa\Intermediate" do if exist "%%~fa\Binaries\" rmdir /s /q "%%~fa\Binaries"
:cleaned
echo Project cleaned
set /P c=Run Unreal Project?[Y/N]? (default = Yes)
if /I "%c%" EQU "Y" goto :run
if /I "%c%" EQU "N" goto :exit
if /I "%c%" EQU "N" goto :run
:run
for /r %%x in (*.uproject) do "%%x"
:exit
echo Exiting