·Î±×ÆÄÀÏ À§Ä¡ : C:\WINDOWS\system32\LogFiles\W3SVC1
½ºÅ©¸³Æ® À§Ä¡ : C:\IIS_Log_Drop.vbs
»èÁ¦ ¼³Á¤ : 7ÀÏÀÌ Áö³ ÆÄÀÏ
¿¹¾àÀÛ¾÷µî·Ï : ¸ÅÀÏ 4½Ã¿¡ ½ÇÇà
¼³Á¤ > Á¦¾îÆÇ > ¿¹¾àµÈ ÀÛ¾÷ > IIS_Log_Drop À¸·Î ¿¹¾à ÀÛ¾÷ µî·Ï
ÆÄÀϸí: IIS_Log_Drop.vbs
-------------------------------------------------------------------------------
'7ÀÏ Áö³ ÆÄÀÏ ÀÚµ¿ »èÁ¦ÇÏ´Â ½ºÅ©¸³Æ®
Option Explicit
' Æú´õ¸í, ³¯Â¥ ÁöÁ¤
Const strRootPath = "C:\WINDOWS\system32\LogFiles\W3SVC1\"
Const nDays = 7
Dim oFSO
Set oFSO = CreateObject("scripting.FileSystemObject")
Dim oFolder, oSubFolder
Set oFolder = oFSO.GetFolder(strRootPath)
Dim oFile
'ÁöÁ¤µÈ Æú´õ ¾ÈÀÇ ÆÄÀÏ »èÁ¦
For Each oFile In oFolder.Files
If Int(Now() - oFile.DateLastModified) >= nDays Then
oFile.Delete
End If
Next
-------------------------------------------------------------------------------