在python中,可以使用shutil.rmtree()方法,删除指定目录文件夹下所有内容。
在使用前,需要导入shutil模块:
import shutil
删除目录文件夹内容:
shutil.rmtree(folderPath)
folderPath是指所要删除的文件夹目录路径。
在python中,可以使用shutil.rmtree()方法,删除指定目录文件夹下所有内容。
在使用前,需要导入shutil模块:
import shutil
删除目录文件夹内容:
shutil.rmtree(folderPath)
folderPath是指所要删除的文件夹目录路径。