|
-
Jul 31st, 2006, 08:39 AM
#1
Thread Starter
Junior Member
Command Line Access
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|