i want to move .evtx file to another location

July 5, 2011 at 06:23:05
Specs: Windows Vista
i want to move .evtx file to another location. lathoght avove code move .log files from same location. but it cant move .evtx files. why?????????

See More: i want to move .evtx file to another location

Report •


#1
July 5, 2011 at 06:24:48
this is that code and i m facing problem, why????

Dim SOURCE, TARGET
SOURCE = "C:\Windows\System32\Winevt\Logs"
TARGET = "D:\Lokesh\"

Dim fso, SourceObj, TargetObj, fileObj
Set fso = CreateObject("Scripting.FileSystemObject")
Set SourceObj = fso.GetFolder(SOURCE)

For Each fileObj in SourceObj.Files
If LCase(Right(fileObj.Name, 4)) = ".evtx" Then
If DateDiff("d", fileObj.DateLastModified, Now) >1 Then
fileObj.Move (TARGET)
End If
End If
Next


Report •
Related Solutions


Ask Question