判断文件/文件夹是否存在
os.path.exists()
生成/删除文件夹
os.mkdir()
shutil.rmtree()
删除文件
os.remove()
复制文件/文件夹
shutil.copy(old_path,new_path)
shutil.copytree(old_folder,new_folder)
判断文件/文件夹是否存在
os.path.exists()
生成/删除文件夹
os.mkdir()
shutil.rmtree()
删除文件
os.remove()
复制文件/文件夹
shutil.copy(old_path,new_path)
shutil.copytree(old_folder,new_folder)