Skip to content

Instantly share code, notes, and snippets.

@Specnr
Last active May 5, 2022 16:30
Show Gist options
  • Save Specnr/8a572ac5c5cfdb54eb0dc7d1eb2906a3 to your computer and use it in GitHub Desktop.
Save Specnr/8a572ac5c5cfdb54eb0dc7d1eb2906a3 to your computer and use it in GitHub Desktop.
DELETES all worlds called New World or Speedrun # in all instances
import shutil
import glob
import os
# Edit this
INST_FOLDER = "C:/MultiInstanceMC/MultiMC/instances"
with open("bop.log", "w") as log:
files = glob.glob(f'{INST_FOLDER}/*/.minecraft/saves/*')
for f in files:
if os.path.isdir(f) and ("New World" in f or "Speedrun #" in f):
log.write("Deleting: " + f + "\n")
shutil.rmtree(f)
else:
log.write("Skipping: " + f + "\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment