20 lines
414 B
Python
20 lines
414 B
Python
|
|
import os
|
|
import shutil
|
|
|
|
src = '.\\Objects\\Pro_App\\Snake.axf'
|
|
dst = '..\\output\\贪吃蛇.axf'
|
|
elf = '..\\elf_reduce.exe'
|
|
|
|
if not os.path.exists(src):
|
|
print(src+' File Error!!!')
|
|
else:
|
|
if os.path.exists(dst):
|
|
os.remove(dst)
|
|
if os.path.exists(elf):
|
|
os.system(elf + ' ' + src + ' ' + dst)
|
|
else:
|
|
shutil.copy(src,dst)
|
|
os.remove(src)
|
|
print(dst+' File copy success.')
|