Run Batch File from within Access

SteveC24

Registered User.
Local time
Today, 12:49
Joined
Feb 1, 2003
Messages
444
Hi,

I have created a very simple backup/restore system, using 2 batch files (one to copy backend to the root folder, and the other to copy it back to it's proper location).

Anyway, I am looking for a way to have the user asked where they would like to put the backup file.

The more I think about it, the less I think I need a batch file at all....but anyway....I was looking to do it from a form, so the user can put in the path in a text box, click Backup, and it will copy the backend over to that path.

TIA
 
Steve,

You can use the Shell command to start your .bat file, there
are examples here; use Search.

Attached is a popular API routine to browse for a file. In this
case it opens a word file.

Wayne
 

Attachments

Never trust a user to key the location of a file or folder. Check out these APIs for calling the standard windows "File Open" and "Browse Folder"...

API: BrowseFolder Dialog
http://www.mvps.org/access/api/api0002.htm

API: Call the standard Windows File Open/Save dialog box
http://www.mvps.org/access/api/api0001.htm

If you search the forum you can probably find a sample that somebody has posted for calling the above APIs.

HTH
 
Thanks for the help....just one problem....I have no idea what this all means!

As I believe some may already know, I know nothing of VB (except maybe understanding the simple stuff when I see it written out).

As for API, I think I may just start crying!!!

Don't suppose you could lower the intellectual level of all that to something near a 4 year old?!?

Thanks!
 

Users who are viewing this thread

Back
Top Bottom