A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Creating bat file for backend compact



 
 
Thread Tools Display Modes
  #1  
Old July 15th, 2004, 05:10 PM
Tasha
external usenet poster
 
Posts: n/a
Default 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  
Old July 15th, 2004, 07:38 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default 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  
Old July 15th, 2004, 09:29 PM
Tasha
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 01:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.