¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 256°Ç
   
IIS LOG ÀÚµ¿»èÁ¦ ½ºÅ©¸³Æ®
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2010-02-17 (¼ö) 11:07 Á¶È¸ : 14885
±ÛÁÖ¼Ò :
                                

·Î±×ÆÄÀÏ À§Ä¡ : 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
-------------------------------------------------------------------------------


À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.