@echo off

cd /d %~dp0
set "sourceDir=%~dp0\Assets\Uninstallation"
set "destDir=%localappdata%\..\LocalLow\Unity\ProjectMoon_LimbusCompany"

if exist "%sourceDir%" (
    
    if not exist "%destDir%" (
	
		echo.
        echo Mod uninstallation unsuccessful. Limbus Company is not installed or has missing files, please launch the game to redownload missing files.
		echo.
		
    )

    xcopy "%sourceDir%\*" "%destDir%" /s /e /y
    
	if errorlevel 1 (
		echo.
		echo Mod uninstallation unsuccessful, close any programs accessing Limbus Company.
		echo.
	) else (
		echo.
		echo Mod uninstallation successful.
		echo.
		
)
	
) else (

	echo.
    echo Mod uninstallation unsuccessful. Assets folder is missing, please download it.
	echo.
	
)

pause