Compact & Repair cmd from command line?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to schedule a task using the windows task scheduler

All I want to do is open an access database, do the compact & repair command, and close the database

What are your ideas about this?
 
Hi Brad,

You can download JetComp.exe, version 4, from Microsoft. It is a stand-alone
command line compression tool for Jet 3.x and 4.x databases. It is even
better than the buiilt-in compacting program.

Ragnar

Brad Rickard said:
I would like to schedule a task using the windows task scheduler.

All I want to do is open an access database, do the compact & repair
command, and close the database.
 
BTW, I of course know how to open the database i want with the schedule, and I know how to write the autoexec macro to perform some functions, like to exit at the end.. I am just stuck on how to tell it to compact and repair

Also, I have a dozen files I do this to currently with a schedule wizard program which seems to fail more than work..

What are your ideas about adding 1 scheduled task through the windows scheduler to open,compact,exit all dozen databases without having a dozen seperate tasks...
 
Well, if you are using Access 2000 or newer you can simply set the option to
compact at close, Tools/Options then select the General tab and set the
checkbox Compact on close.
Then you can open it with a Windows Scheduled Task, and set the Startup to
run a sub that closes it..
If you want to do this with more than one database file I would suggest you
write a small VB app to do it, then run the app from the Scheduled Task.

Ragnar
 
Back
Top