Public objFSOFolder = "d:\Cache\"Set objFSO = CreateObject("Scripting.FileSystemObject")If objFSO.FolderExists(Folder) Then Call ClrFolder(Folder) WScript.Echo "Готово."Else WScript.Echo "Не найден путь " & FolderEnd IfWScript.Quit 0Function ClrFolder(strFolder)Dim objFolder, objFile, objSubFolderSet objFolder = objFSO.GetFolder(strFolder)For Each objFile In objFolder.Files If objFile.Size < 1024 Then objFile.Delete TRUENextFor Each objSubFolder In objFolder.SubFolders Call ClrFolder(objSubFolder.Path)NextEnd Function
function timer() t= os.time() if hc_static['NextStart'] < t then hc_static['LastStart']= t hc_static['NextStart']= t+hc_static['Period']*3600 SaveParams() hc.put_msg('Очистка кэша запущена') hc.execute_and_wait( [[D:\HC\Extensions\DelFileSize.vbs]])-- hc.execute_cmd('ClearCache') hc.put_msg('Очистка кэша завершена') endend