python - Delete Windows 10 Event Logs evtx -


i tried create script delete windows 10 x64 event logs. couldn't tried overwrite it's size "1". path of logs c:\windows\system32\winevt\logs.

i have method overwrite files seems there in not such directory.

method:

def bytesoverwrite(filepath): multiplier = extra.getsize(filepath) open(filepath, "w") text_file:      text_file.write(multiplier * "1") 

path:

windows_event_deduplication = os.path.join("c:",os.sep,"windows", "system32", "winevt", "logs","microsoft-windows-deduplication%4diagnostic.evtx") 

error:

windowserror: [error 3] system cannot find path specified: 'c:\\windows\\system32\\winevt\\logs\\microsoft-windows-deduplication%4diagnostic.evtx' 

is there other way or library edit or delete evtx files?


Comments