If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Creating bat file for backend compact
I have a backend db on server. I would like to create a bat file that would run in the middle of the night that would backup and the database and files associated with it and then compact the backend of the database. I have created a bat file that will back up the files when I run it from the cmd prompt but I have been unsuccessful in automating it. The database is secured and requires a specific workgroup, user name and pwd.
Any suggestions, TIA Tasha |
#2
|
|||
|
|||
Creating bat file for backend compact
It should be something like:
"C:\Program Files\Microsoft Office\Office\MSAccess.exe" "C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb" /user username /pwd password /wrkgrp "C:\Windows\System32\Secure.mdw" /compact (all on one line, of course) You have the option of specifying a file name to compact to after /compact: if you don't provide one, it'll overwrite the existing database. Since you're doing this in batch, my advice is don't compact on top of itself: if something goes wrong, you've lost your database. Rather, have your batch file rename the file to some save, then compact the renamed file to the original file name. That way, you still have a copy available, just in case. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (No private e-mails, please) "Tasha" wrote in message ... I have a backend db on server. I would like to create a bat file that would run in the middle of the night that would backup and the database and files associated with it and then compact the backend of the database. I have created a bat file that will back up the files when I run it from the cmd prompt but I have been unsuccessful in automating it. The database is secured and requires a specific workgroup, user name and pwd. Any suggestions, TIA Tasha |
#3
|
|||
|
|||
Creating bat file for backend compact
"Douglas J. Steele" wrote: It should be something like: "C:\Program Files\Microsoft Office\Office\MSAccess.exe" "C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb" /user username /pwd password /wrkgrp "C:\Windows\System32\Secure.mdw" /compact Thank you. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Size of Excel file Access db exports to. | Tasha | General Discussion | 2 | June 5th, 2004 01:48 PM |
Lost quite a few *.dbx files after File Compact | Joel Goldstick | Outlook Express | 3 | June 1st, 2004 06:22 AM |
"Excel file locked by [user]" though user is the one trying to open it! | Lady Layla | Setting up and Configuration | 0 | May 12th, 2004 02:12 PM |
"Excel file locked by [user]" though user is the one trying to open it! | CheriD. | Setting up and Configuration | 0 | May 11th, 2004 09:21 PM |
Locked for editing??? | Barbie | Setting up and Configuration | 1 | April 27th, 2004 04:40 AM |