#Importing os and glob modules
import os, glob
#Loop Through the folder projects all files and deleting them one by one
for file in glob.glob("pythonpool/*"):
os.remove(file)
print("Deleted " + str(file))
【python】删除指定文件夹下的所有文件
最新推荐文章于 2024-04-22 11:13:10 发布