Compact and repair batch file

Posted on 2005-03-30
Medium Priority
Last Modified: 2010-09-21
How would I go about creating a batch file that could compact (and repair) my database?
Hopefully this is easy. (i just could not find any information about how I could do this from a command prompt (batch file))

Question by:ThaSmartUno
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 41

Accepted Solution

shanesuebsahakarn earned 1000 total points
ID: 13665844
This command line should do it:

"<path to msaccess.exe>" "<path to your mdb>" /compact
LVL 10

Author Comment

ID: 13665883
Thank you
LVL 15

Expert Comment

by:Simon Ball
ID: 13666119
How does he get there so fast?!?!?!
LVL 10

Author Comment

ID: 13666145
I don't know, but I could have sworn I had accepted his answer earlier too

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question