移动文件和文件夹 import shutil shutil.move(r"E:Untitled-1.txt",r"E:自动化办公重新改名.txt") shutil.move("旧文件夹路径","新文件夹路径")