Last active
August 7, 2019 22:25
-
-
Save chrmoritz/c304dead49ce6a38653f to your computer and use it in GitHub Desktop.
Trove extract client script (MIT licensed)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
if not exist "%~dp0\Trove.exe" ( | |
echo. Error: Couldn't find Trove.exe | |
echo. Please but this .bat script inside your Trove folder and retry! | |
echo.&pause&goto:eof | |
) | |
echo. This script will extract all client files to the extracted folder. | |
echo. All current contents of the extracted folder will be overwritten. | |
echo. Please make backups of your modifications before continuing! | |
set /p test=Do you want to continue? (y/n) | |
if not "%test%" == "y" exit | |
rmdir /Q /S extracted | |
call:extractFolder "%~dp0" | |
echo. | |
echo. Completed extraction of the clientfiles to: | |
echo. "%~dp0"\extracted | |
echo.&pause&goto:eof | |
:extractFolder | |
for /D %%f in ("%~1*") do ( | |
if not "%%~nf" == "extracted" ( | |
if exist "%~2%%~nf\index.tfi" ( | |
echo. extracting %~2%%~nf | |
"%~dp0Trove.exe" -tool extractarchive %~2%%~nf extracted\%~2%%~nf | |
) | |
call:extractFolder "%~1%%~nf\", "%~2%%~nf\" | |
) | |
) | |
goto:eof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
if not exist "%~dp0\Trove.exe" ( | |
echo. Error: Couldn't find Trove.exe | |
echo. Please but this .bat script inside your Trove folder and retry! | |
exit /B 1 | |
) | |
rmdir /Q /S extracted | |
call:extractFolder "%~dp0" | |
echo. | |
echo. Completed extraction of the clientfiles to: | |
echo. "%~dp0"\extracted | |
exit | |
:extractFolder | |
for /D %%f in ("%~1*") do ( | |
if not "%%~nf" == "extracted" ( | |
if exist "%~2%%~nf\index.tfi" ( | |
echo. extracting %~2%%~nf | |
"%~dp0Trove.exe" -tool extractarchive %~2%%~nf extracted\%~2%%~nf | |
) | |
call:extractFolder "%~1%%~nf\", "%~2%%~nf\" | |
) | |
) | |
goto:eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mk