Python 调用C# 删除所有文件

    xiaoxiao2021-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)