OraclE
archive file 자동 삭제 스크립트-window
타마마임팩트_쫀
2008. 10. 7. 17:02
Option Explicit
Const strRootPath = "C:\Temp\"
Const nDays = 10 ' 초과일수
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.DateLastAccessed) >= nDays Then
oFile.Delete
End If
Next
------------------------------------------------
확장자 vbs로 저장
oFile.DateLastAccessed => oFile.DateLastModified
[출처] archive file 자동 삭제 스크립트-window|작성자 오라클광