Skip to content

Instantly share code, notes, and snippets.

@SansPapyrus683
Created March 29, 2025 23:45
Show Gist options
  • Save SansPapyrus683/ad5997792637fc8536ca169a26a36802 to your computer and use it in GitHub Desktop.
Save SansPapyrus683/ad5997792637fc8536ca169a26a36802 to your computer and use it in GitHub Desktop.
put a zip file right into your mc saves
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