首页
IT
登录
6mi
u
盘
搜
搜 索
IT
Python 调用C# 删除所有文件
Python 调用C# 删除所有文件
xiaoxiao
2021-03-25
169
import
clr clr.
AddReference
(
"System"
) clr.
AddReference
(
"System.Xml"
)
from
System.Xml
import
*
from
System.IO
import
*
def
DeleteFiles
(sPath):
#在此处插入函数正文
dir =
DirectoryInfo
(sPath); fs = dir.
GetFiles
(
"*.*"
)
for
f
in
fs: f.
Delete
()
#函数末尾
return
转载请注明原文地址: https://ju.6miu.com/read-3011.html
技术
最新回复
(
0
)