Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set "minecraft=C:/Users/Coornhert/AppData/Roaming/.minecraft"
- setlocal enabledelayedexpansion
- set "selected=1"
- set "max=0"
- cd mods
- set a=0
- call:print
- :menu
- choice /c wse>nul
- if "!errorlevel!"=="1" (
- if not "!selected!"=="1" (
- set /a "selected-=1"
- call:print
- )
- )
- if "!errorlevel!"=="2" (
- set /a "selected+=1"
- call:print
- )
- if "!errorlevel!"=="3" (
- call:run
- call:print
- )
- goto menu
- :print
- cls
- echo.
- echo Uninstalled:
- echo.
- set a=0
- set "max=0"
- for %%f in (*.jar) do (
- set /a "max+=1"
- if not exist "!minecraft!/mods/%%~nf.jar" (
- set /a "a+=1"
- if "!a!"=="!selected!" (
- echo -%%~nf
- ) else (
- echo %%~nf
- )
- )
- )
- echo.
- echo Installed:
- echo.
- for %%f in (*.jar) do (
- if exist "!minecraft!/mods/%%~nf.jar" (
- set /a "a+=1"
- if "!a!"=="!selected!" (
- echo -%%~nf
- ) else (
- echo %%~nf
- )
- )
- )
- goto :eof
- :run
- set a=0
- for %%f in (*.jar) do (
- if not exist "!minecraft!/mods/%%~nf.jar" (
- set /a "a+=1"
- if "!a!"=="!selected!" (
- copy %%f "!minecraft!/mods/%%~nf.jar"
- if exist %%~nf.txt (
- for /f "tokens=*" %%B in (%%~nf.txt) do (
- cd cores
- copy "%%B" "!minecraft!/mods"
- cd ..
- )
- )
- )
- )
- )
- for %%f in (*.jar) do (
- if exist "!minecraft!/mods/%%~nf.jar" (
- set /a "a+=1"
- if "!a!"=="!selected!" (
- set "old=%CD%"
- cd "!minecraft!/mods"
- del "%%~nf.jar"
- cd !old!
- if exist "%%~nf.txt" (
- for /F "tokens=*" %%B in (%%~nf.txt) do (
- set do=1
- for %%g in (*.txt) do (
- if exist "!minecraft!/mods/%%~ng.jar" (
- if exist "%%~ng.txt" (
- for /F "tokens=*" %%C in (%%~ng.txt) do if "%%C"=="%%B" set do=0
- )
- )
- )
- if "!do!"=="1" (
- set "old=%CD%"
- cd "!minecraft!/mods"
- del "%%B"
- cd !old!
- )
- )
- )
- )
- )
- )
- goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement