Attribute Error for Rename / Replace
python-forum.io › thread-23576Feb 17, 2019 · rename_files () print("2...Zip Files Renamed...") filename = ['report.csv'] for item in os.listdir (dir_name): if item.endswith (".zip"): file_path = os.path.join (dir_name, item) with zipfile.ZipFile (file_path) as zf: for target_file in filename: if target_file in zf.namelist ():