tm1 log file delete
Posted: Tue May 26, 2020 1:14 am
Hi ,
I have a vb script that deletes the logs which are older than 3 days,
I have 3 instances and the task has 3 steps which deletes the logs from 3 instances .
I am having issue where the task goes to running state and not completes. When looked at it there is some tm1event log which it canot delete.
Any one had similar issue .
Script is below
option explicit
Dim rootFolder, files, File, f1, fso
set fso = createObject("Scripting.FileSystemObject")
'change folder here
set rootFolder = fso.GetFolder("D:\APAC\Logs\")
set files = rootFolder.Files
For each File in files
'On Error Resume Next
Set f1 = fso.GetFile("D:\APAC\Logs\"&File.Name)
'change amount of days here; files where last modification was longer ago than 5 days will be deleted
if File.DateLastModified < (date-3) then
'wscript.echo "deleted"
f1.delete
end if
NEXT
Thanks
I have a vb script that deletes the logs which are older than 3 days,
I have 3 instances and the task has 3 steps which deletes the logs from 3 instances .
I am having issue where the task goes to running state and not completes. When looked at it there is some tm1event log which it canot delete.
Any one had similar issue .
Script is below
option explicit
Dim rootFolder, files, File, f1, fso
set fso = createObject("Scripting.FileSystemObject")
'change folder here
set rootFolder = fso.GetFolder("D:\APAC\Logs\")
set files = rootFolder.Files
For each File in files
'On Error Resume Next
Set f1 = fso.GetFile("D:\APAC\Logs\"&File.Name)
'change amount of days here; files where last modification was longer ago than 5 days will be deleted
if File.DateLastModified < (date-3) then
'wscript.echo "deleted"
f1.delete
end if
NEXT
Thanks