只是把一个进入时间位置,移动和其它移动比第一从温度到最终位置
os.system("move /images/hud.png /images/special/hud.png.tmp")
os.system("move /images/special/hud.png /images/hud.png")
os.system("move /images/special/hud.png.tmp /images/special/hud.png")
或做对一切使用python:
# load file 1 into buffer
data = ""
with open("/images/hud.png", "rb") as f:
data = f.read()
# copy file 2 into file 1
with open("/images/special/hud.png", "rb") as f1:
with open("images/hud.png", "wb") as f2:
f2.write(f1.read())
# save file 1 from buffer
with open("/images/special/hud.png", "wb") as f:
f.write(data)
# clear memory
del data
_我希望这是有道理的不是。再试一次。此外,向我们展示您迄今为止所尝试的内容并发布您的代码。 SO不是一种编码服务。 – DyZ
[如何使用Python重命名文件]的可能重复(https://stackoverflow.com/questions/2491222/how-to-rename-a-file-using-python);交换两个文件与两个(或三个)重命名操作没有区别。 – ppperry