import os ## go to file folder os.chdir("file_folder") ## change its name os.rename("old_name", "new_name")
from pathlib import Path path = Path("D: est") temp = path.rename("Enter new folder name") new_path = temp.absolute()