As the error kept on coming, and second thought/descision to keep log-files out of the database, I made following cmd file that did the trick for me:
SETLOCAL
CLS
GOTO Script
::ScriptHeader
:: ====================================
::
:: Program name: ArchiveNSLogFiles.cmd
:: Version: 1.0.1
::
:: Infolink Consultancy BV - Netherlands
::
:: v1.0.0 Guido Langendorff - 20090508
:: Initial setup
:: v1.0.1 Guido Langendorff - 20090511
:: Cosmetic adjustments
::
:: Syntax: ArchiveNSLogFiles.cmd
:: Parameters: None
::
:: Tested on: Windows XP SP2; Windows 2003 R2 SP2,
::
:: Purpose
:: On some occassions buildin LOG archiver fails (scheduled task gives error)
:: This script also keeps data out of database
:: ====================================
:Script
:: User Variables to set
:: =====
:: Set MaxFile value. Not found a way to extract from Registry as it is a Hex value
:: -----
REM See "HKLM\Software\Altiris\eXpress\Event Logging\Logfile\MaxFiles"
SET MaxFiles=50
:: Change this to the path you like
SET ArchivePath=D:\Install\ArchiveLog
IF NOT EXIST "%ArchivePath%" md "%ArchivePath%"
:: System Variables. Please do not change below unless you are sure
:: =====
:: Define query to the Registry to get the present path for S logging
:: -----
SET QueryCommand=REG QUERY "HKLM\Software\Altiris\eXpress\Event Logging\Logfile" /v FilePath
:: Running Query to the Registry to get the Altiris installation/log path
:: -----
FOR /F "usebackq tokens=2*" %%Q in (`%QueryCommand%`) DO SET AltirisLogPath=%%R
:: Creating day-stamp in proper order (yyyyymmdd) so folders are in correct order
:: -----
SET Year=%Date:~-4,4%
SET Month=%Date:~-7,2%
SET Day=%Date:~-10,2%
SET DayName=%Date:~0,2%
SET DateStamp=%Year%%Month%%Day%
:: Check if exist and if not create the folder to archive all the NS Logs
:: -----
IF NOT EXIST "%ArchivePath%\%DateStamp%\a*.log" MD "%ArchivePath%\%DateStamp%"
:: Copy NS Log files to Archive. If exist in Archive the originals are removed
:: -----
FOR /L %%N in (1,1,%MaxFiles%) DO (
IF EXIST "%AltirisLogPath%\a%%N.log" COPY /Y "%AltirisLogPath%\a%%N.log" "%ArchivePath%\%DateStamp%"
IF EXIST "%ArchivePath%\%DateStamp%\a%%N.log" DEL /Q "%AltirisLogPath%\a%%N.log"
)
:: Cleaning
:: -----
SET ArchivePath=
SET QueryCommand=
SET AltirisLogPath=
SET MaxFiles=
SET Year=
SET Month=
SET Day=
SET DayName=
SET DateStamp=
:EOS
:EOF
Hope it is of any use for you
Guido