I have written a script to back/compact/repair an msaccess db it works
fine however i would like to determine if access successfully compact
and repaired the database. How could i do this?

I am running Access2k

Here is the batch script:

@echo off

copy "w:\l&c\stats\StatsConvert2k.mdb" c:\backups\stats\%date:~-4,
4%%date:~-7, 2%%date:~0,2%StatsConvert2k.mdb

IF ERRORLEVEL = 1 GOTO COPYERR

REM This compacts and repairs the live database
START "" /B /MAX /REALTIME /WAIT
c:\progra~1\micros~3\Office\msaccess.exe
"w:\l&c\stats\StatsConvert2k.mdb" /COMPACT /WRKGRP
c:\progra~1\common~1\system\System.mdw

echo Task complete
@echo %date:~-4, 4%%date:~-7, 2%%date:~0,2% STATS BACKED
UP/COMPACTED/REPAIRED >> c:\backups\log.txt
exit

:COPYERR
echo Error making backup compact/repair aborted
echo %date:~-4,4%%date:~-7,2%%date:~0,2% COPY FAILED >>
c:\backups\log.txt