Created
March 29, 2025 23:45
-
-
Save SansPapyrus683/ad5997792637fc8536ca169a26a36802 to your computer and use it in GitHub Desktop.
put a zip file right into your mc saves
This file contains hidden or 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
import sys | |
import zipfile | |
from pathlib import Path | |
import os | |
import shutil | |
path = sys.argv[1] | |
extract_to = Path(path).stem | |
with zipfile.ZipFile(path, 'r') as zip_ref: | |
os.makedirs(extract_to) | |
zip_ref.extractall(extract_to) | |
loc = Path(extract_to) / os.listdir(extract_to)[0] | |
new_loc = Path(os.getenv("APPDATA")) / ".minecraft" / "saves" | |
shutil.move(loc, new_loc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment