17 lines
291 B
Python
17 lines
291 B
Python
|
#!/bin/python3
|
||
|
|
||
|
# reorder Index des images
|
||
|
import os
|
||
|
|
||
|
BASE = '../static/files/images/'
|
||
|
l = os.listdir(BASE)
|
||
|
print(l)
|
||
|
|
||
|
for e in l:
|
||
|
if int(e) >= 1000:
|
||
|
os.rename(BASE + e, BASE + str(27+int(e)-1000))
|
||
|
if e.zfill(5) != e:
|
||
|
os.rename(BASE + e, BASE + e.zfill(5))
|
||
|
|
||
|
|