Tool to move, compress, delete web logs


Does anyone know any good free / open source tools that will move, compress and delete web logs when scheduled to do so?

Who is Participating?
tanujchandnaConnect With a Mentor Commented:

There is no as such tool, .vbs scripts are available which you can use for all these activities.
James MurrellProduct SpecialistCommented:
we use a vbs script and then sftp them to us..

we use the command options in 7z (better compression that winzip)

below is batch file to backup and the delete vbs file to delete

(its up to you how you get them back to you)

regards James
--- bat file

@echo off


for /F "tokens=2-4 delims=/ " %%f in ('date /t') do (
 set mm=%%f
 set dd=%%g
 set yyyy=%%h

REM Substract your 1 day here
set /A dd=1%dd% - 100 - 1
set /A mm=1%mm% - 100 + 0

if /I %dd% GTR 0 goto DONE

set /A mm=%mm% - 1

if /I %mm% GTR 0 goto ADJUSTDAY

set /A mm=12
set /A yyyy=%yyyy% - 1


if %mm%==1 goto SET31
if %mm%==2 goto LEAPCHK
if %mm%==3 goto SET31
if %mm%==4 goto SET30
if %mm%==5 goto SET31
if %mm%==6 goto SET30
if %mm%==7 goto SET31
if %mm%==8 goto SET31
if %mm%==9 goto SET30
if %mm%==10 goto SET31
if %mm%==11 goto SET30
if %mm%==12 goto SET31

goto ERROR


set /A dd=31 + %dd%

goto DONE


set /A dd=30 + %dd%

goto DONE


set /A tt=%yyyy% %% 4

if not %tt%==0 goto SET28

set /A tt=%yyyy% %% 100

if not %tt%==0 goto SET29

set /A tt=%yyyy% %% 400

if %tt%==0 goto SET29


set /A dd=28 + %dd%

goto DONE


set /A dd=29 + %dd%


C:\7z\7za a -mx1 -r -ms=off E:\backuplocationfolder\IIS_log_files_%COMPUTERNAME%_%date:~0,2%-%date:~3,2%-%date:~6,6%_logfiles.7z E:\logfiles\*.*


------new file called deletelog.vbs

Dim fso: Set fso = CreateObject("Scripting.FileSystemObject")
Set objFolder = fso.GetFolder("E:\logfiles\")
for each file in objFolder.Files
        If DateDiff("d", file.DateLastModified, Date) > 1 Then
        End If

Open in new window

bcrawley01Author Commented:
Appears to be no tools available
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.