We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da7a94d commit fa426e4Copy full SHA for fa426e4
scripts/rename_folders.py
@@ -0,0 +1,16 @@
1
+import json
2
+import os
3
+import shutil
4
+
5
+# Load game name to ID mapping
6
+with open('json/ids.json', 'r') as f:
7
+ game_mappings = json.load(f)
8
9
+# Iterate over the directories inside 'json' folder
10
+base_path = 'json'
11
+for game_name in os.listdir(base_path):
12
+ full_path = os.path.join(base_path, game_name)
13
+ if os.path.isdir(full_path) and game_name in game_mappings:
14
+ game_id = game_mappings[game_name]
15
+ new_full_path = os.path.join(base_path, game_id)
16
+ shutil.move(full_path, new_full_path)
0 commit comments