Backup Access Databases  
What is the Windows Script Host?

The Microsoft Windows Script Host (WSH) is a tool that will allow you to run Visual Basic Scripting Edition and JScript natively within the base Operating System, either on Windows 95 or Windows NT 4.0. Using the scripting languages you already know you can now write script to automate common tasks, and to create powerful macros and logon scripts. Find out more about it - Windows Script Host This Microsoft site also has complete documentation for WSH.

About this script...

  • Written in VBS
  • Makes a rolling 7 day backup of an MS Access database.
  • Checks to be sure the database is not in use before backing it up.
  • Should be scheduled to execute daily using the 'Scheduled Tasks' folder available in the Windows Explorer (or NT Explorer.)
  • Logs results to a text file.

Instructions

  • Make sure WSH is installed on your system. You can do this by doing a 'Find File' for wscript.exe. If the file exists - WSH is installed, if not, install it from here - Download Microsoft Windows Script Host.
  • Download the script here, then change the extension to .vbs
    NOTE - You may need to right-click the link, then choose 'Save Target As...'
  • Edit the script - changing the paths for MdbUpdateLog, bakFile and origMdbFile to reflect valid paths for your log, backup location & original database. Make sure you have read/write permissions for the designated directories.
  • Start Windows Explorer and open the 'Scheduled Tasks' folder in the left pane.
  • Double-Click on 'Add Scheduled Tasks' and use the 'Scheduled Task Wizard' to schedule your backup.
   



FILE AT A GLANCE

Download Now

Works with
Windows 98, ME, NT4, 2000

File name
backupDBs.txt

File size
3 KB

Hard disk space required
3 KB

Estimated download time
< 5 sec @ 56K

Last updated
December 6, 2000