我试图创建一个脚本来删除Windows10x64事件日志。我做不到,所以我试图用“1”覆盖它的大小。日志的路径是C:\Windows\System32\winevt\Logs
。在
我有这个方法覆盖文件,但它似乎没有在这样的目录。在
方法:
def bytesOverwrite(filepath):
multiplier = extra.getSize(filepath)
with open(filepath, "w") as text_file:
text_file.write(multiplier * "1")
路径:
^{pr2}$错误:
WindowsError: [Error 3] The system cannot find the path specified: 'C:\\Windows\\System32\\winevt\\Logs\\Microsoft-Windows-Deduplication%4Diagnostic.evtx'
是否有其他方法或库来编辑或删除evtx文件?在
目前没有回答
相关问题 更多 >
编程相关推荐