import os os.rename("first.zip", "first_01.zip") from pathlib import Path data_file = Path("data_01.txt") data_file.rename("data.txt")