2024-09-27 18:06:02 发布
网友
Possible Duplicate:Deleting files by type in Python on Windows
如何删除目录中扩展名为“.txt”的所有文件?我通常只是
import os filepath = 'C:\directory\thefile.txt' os.unlink(filepath)
是否有像os.unlink('C:\ directory\'*.txt)这样的命令可以删除所有.txt文件?我该怎么做? 谢谢!
目前没有回答
目前没有回答
相关问题 更多 >
编程相关推荐