Wednesday, August 27, 2008

Batch Convert Microsoft Access MDB Files

If you have a lot of Microsoft Access database files in older MDB formats, it can get tedious having to open each MDB file individually and selecting Tools > Database Utilities > Convert To Access xxxx. I found out that you can do the conversion in the Windows Command Prompt window by passing in the name and path to the old MDB file, and the new name and path to the new MDB file as arguments to the MSACCESS.EXE executable. An example is shown below:


"C:\Program Files\Microsoft Office\Office\msaccess.exe" "C:\Path\To\yourOldFile.mdb" /convert "C:\Path\To\yourNewFile.mdb"


If you prefer, you can create a DOS batch file or VBSCRIPT and loop through all the MDB files you want to convert.

No comments: