Skip to content

Instantly share code, notes, and snippets.

@paulorenanmelo
Last active January 27, 2020 17:33
Show Gist options
  • Save paulorenanmelo/f36859c9d4b74f7d972fc24946cca640 to your computer and use it in GitHub Desktop.
Save paulorenanmelo/f36859c9d4b74f7d972fc24946cca640 to your computer and use it in GitHub Desktop.
Put this alongside your .uproject, and change UATpath accordingly to where your engine is installed. This bat deletes all binaries and intermediate folders from the project and plugins, and regenerate project files (if your project is a c++ project).
@echo off
set UATpath="C:\EpicGames\UE_4.24\Engine\Binaries\DotNET\UnrealBuildTool.exe"
if exist Intermediate (
echo Intermediate
rmdir Intermediate /s /q
)
if exist intermediate (
echo intermediate
rmdir intermediate /s /q
)
if exist Binaries (
echo Binaries
rmdir Binaries /s /q
)
if exist binaries (
echo binaries
rmdir binaries /s /q
)
echo Plugins
if exist Plugins (
for /R "Plugins" %%G in (\) do (
if exist %%GIntermediate (
echo %%GIntermediate
rmdir %%GIntermediate /s /q
)
if exist %%Gintermediate (
echo %%Gintermediate
rmdir %%Gintermediate /s /q
)
if exist %%GBinaries (
echo %%GBinaries
rmdir %%GBinaries /s /q
)
if exist %%Gbinaries (
echo %%Gbinaries
rmdir %%Gbinaries /s /q
)
)
)
echo plugins
if exist plugins (
for /R "plugins" %%G in (\) do (
if exist %%GIntermediate (
echo %%GIntermediate
rmdir %%GIntermediate /s /q
)
if exist %%Gintermediate (
echo %%Gintermediate
rmdir %%Gintermediate /s /q
)
if exist %%GBinaries (
echo %%GBinaries
rmdir %%GBinaries /s /q
)
if exist %%Gbinaries (
echo %%Gbinaries
rmdir %%Gbinaries /s /q
)
)
)
if not exist source (
if not exist Source (
goto finish
)
)
FOR %%F IN (*.uproject) DO (
set projectFile=%%F
goto eof
)
goto errorNoUprojectFound
:eof
echo %UATpath% "%CD%\%projectFile%"
call %UATpath% -projectfiles -project="%CD%\%projectFile%" -game -rocket -progress
goto finish
:errorNoUprojectFound
echo No uproject found
:finish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment