File: Assets-renamer.py - Tab length: 1 2 4 8 - Lines: on off - No wrap: on off

01: import os
02: from os import walk, rename, system
03: from os.path import join, splitext
04: 
05: origpath = 'C:/Users/florian/AppData/Local/Packages/Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy/LocalState/Assets'
06: mypath = 'C:/Users/florian/Desktop/Assets'
07: if not os.path.exists(mypath):
08:     os.makedirs(mypath)
09: system('cp ' + origpath + '/* ' + mypath + '/')
10: for (dirpath, dirnames, filenames) in walk(mypath):
11:     for f in filenames:
12:         src = join(dirpath, f)
13:         dst = splitext(src)[0] + '.png'
14:         rename(src, dst)
15:         print(src, dst)
16:     break