Assuming that the extension ***
of "report_final_1.**"
is 3 characters,
import os
For filename in os.listdir("): #iterate all files in the current directory
if filename.startswith ("Report_"):
os.rename ("report" + filename[-5:])
© 2024 OneMinuteCode. All rights reserved.