Files
forge/forge-gui/tools/migrateUpcoming.py
2018-01-13 10:21:23 -05:00

13 lines
463 B
Python

import os
import subprocess
cardsfolder = os.path.join(os.path.dirname(os.getcwd()), 'res', 'cardsfolder')
upcoming = os.path.join(cardsfolder, 'upcoming')
for dirName, subdirList, fileList in os.walk(upcoming):
for filename in fileList:
if filename.startswith(".")
continue
curLocation = os.path.join(upcoming, filename)
newFile = os.path.join(cardsfolder, filename[0], filename)
subprocess.call('git mv %s %s' % (curLocation, newFile), shell=True)