Boot multiple Minecraft versions (modded and non) simply from one little batch!
Minecraft.bat:
Code:
Rundown:
Automatically locates and lists any number of alternative minecraft versions.
1) Create Minecraft.bat and place it in a folder of your choice.
2) Place Minecraft.exe in this same folder
3) Create a subfolder with a unique name
4) Add the .minecraft folder with your desired version into said subfolder
5) Repeat process per-version (swap out mods on the same versions even)
6) Run Minecraft.bat and select your desired version
Folder Layout from example:
Code:
Changelog:
1) Unlimited the quantity of versions to select from
2) Added the ability to add an empty version folder
3) Added the ability to delete a version folder
4) Added the option to backup your %APPDATA% version
Todo:
1) Add argument handler
1a) Allow shortcut executions of specific versions
Minecraft.bat:
Code:
@ECHO off
:initiate
set /A Counter=0
set Version=?
set /A Args=0
setlocal ENABLEDELAYEDEXPANSION
:handleargs
:list
cls
set /A Counter=0
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
echo XX XX
echo XX Minecraft Multiboot XX
echo XX by Komak57 XX
echo XX XX
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
echo 0: Default
for /f "usebackq tokens=*" %%i in (`dir /b/o:e`) do (
if exist "%%~nxi\.minecraft" (
set /A Counter+=1
echo !Counter!: %%~nxi
)
)
echo -------------------------
echo n: New empty version
echo b: Backup Default
echo d: Delete version
echo e: Exit Program
echo -------------------------
:input
set INPUT=
set /P INPUT=Version: %=%
if "%INPUT%"=="" goto list
if %INPUT%==0 (goto run)
if %INPUT%==b (goto backup)
if %INPUT%==e (goto end)
if %INPUT%==n (goto new)
if %INPUT%==d (goto delete)
set /A Counter=0
for /f "usebackq tokens=*" %%i in (`dir /b/o:e`) do (
if exist "%%~nxi\.minecraft" (
set /A Counter+=1
if !Counter!==%INPUT% (
set Version=%%~nxi
goto run
)
)
)
echo Invalid Choice
goto :list
:run
if !Version!==? (
echo Running default version.
PAUSE
minecraft.exe
) else (
echo Running !Version!
PAUSE
set APPDATA=!Version!
minecraft.exe
)
goto end
:new
echo New Version Folder...(leave blank to cancel)
set INPUT=
set /P INPUT=Folder Name: %=%
if "%INPUT%"=="" (goto list)
md "%INPUT%"
md "%INPUT%\.minecraft"
goto list
:backup
echo Back up Version(leave blank to cancel)
echo *NOTE* This will overwrite existing folders
set INPUT=
set /P INPUT=Save As: %=%
if "%INPUT%"=="" (goto list)
md "%INPUT%"
md "%INPUT%\.minecraft"
echo Copying! This may take a bit...
XCOPY /E/Y/Q "%APPDATA%\.minecraft" "%INPUT%\.minecraft"
PAUSE
goto list
:delete
echo Delete...(leave blank to cancel)
set INPUT=
set /P INPUT=Folder Number: %=%
if "%INPUT%"=="" (goto list)
set /A Counter=0
for /f "usebackq tokens=*" %%i in (`dir /b/o:e`) do (
if exist "%%~nxi\.minecraft" (
set /A Counter+=1
if !Counter!==%INPUT% (
echo Deleting...
rmdir /s /q "%%~nxi"
)
)
)
goto list
:end
endlocal
echo Goodbye :3 -Komak57
exit
Rundown:
Automatically locates and lists any number of alternative minecraft versions.
1) Create Minecraft.bat and place it in a folder of your choice.
2) Place Minecraft.exe in this same folder
3) Create a subfolder with a unique name
4) Add the .minecraft folder with your desired version into said subfolder
5) Repeat process per-version (swap out mods on the same versions even)
6) Run Minecraft.bat and select your desired version
Folder Layout from example:
Code:
.\Eighth block
.\Eighth block\.minecraft
.\v1.1
.\v1.1\.minecraft
.\Minecraft.bat
.\Minecraft.exe
Changelog:
1) Unlimited the quantity of versions to select from
2) Added the ability to add an empty version folder
3) Added the ability to delete a version folder
4) Added the option to backup your %APPDATA% version
Todo:
1) Add argument handler
1a) Allow shortcut executions of specific versions