Update 更新文件名.py

This commit is contained in:
frxz751113
2024-09-15 11:20:40 +08:00
committed by GitHub
parent 9f9634ef71
commit 292837a9b4
+2 -2
View File
@@ -46,8 +46,8 @@ def rename_files():
full_new_path = os.path.join(os.getcwd(), new_filename) full_new_path = os.path.join(os.getcwd(), new_filename)
os.rename(full_old_path, full_new_path) os.rename(full_old_path, full_new_path)
print(f"Renamed {old_filename} to {new_filename}") print(f"Renamed {old_filename} to {new_filename}")
else: else:
continue continue
# 更新记录时间的文件 # 更新记录时间的文件
with open(time_file_path, 'w') as time_file: with open(time_file_path, 'w') as time_file:
time_file.write(current_date) time_file.write(current_date)