Skip to content

Commit

Permalink
update remap file
Browse files Browse the repository at this point in the history
  • Loading branch information
halgari committed Dec 4, 2024
1 parent a9c9918 commit a3e114b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/rename_folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import shutil

# Load game name to ID mapping
with open('json/ids.json', 'r') as f:
with open('json/ids.json', 'rb') as f:
game_mappings = json.load(f)

# Iterate over the directories inside 'json' folder
base_path = 'json'
for game_name in os.listdir(base_path):
full_path = os.path.join(base_path, game_name)
if os.path.isdir(full_path) and game_name in game_mappings:
game_id = game_mappings[game_name]
game_id = str(game_mappings[game_name])
new_full_path = os.path.join(base_path, game_id)
shutil.move(full_path, new_full_path)

0 comments on commit a3e114b

Please sign in to comment.