2020-07-31 21:29:41 星期五
可执行文件.exe下载地址:
https://wws.lanzous.com/i7JLaf6beab
import os
os.system('title www.5yang.cc @小伍的游乐场')
old_name = input('请输入需要备份的文件名(含后缀): ')
index = old_name.rfind('.')
new_name = old_name[:index] + '[备份]' + old_name[index:]
old_f = open(old_name,'rb')
new_f = open(new_name,'wb')
while True:
con = old_f.read(1024)
if len(con) == 0:
break
print('开始拷贝,请耐心等待.速度为1024')
new_f.write(con)
old_f.close()
new_f.close()
print('拷贝完成!')
其实不用这么麻烦,python自己就有相关函数!