Distribution: Difference between revisions

From ZDN User Guide
 
(9 intermediate revisions by the same user not shown)
Line 16: Line 16:
Instructions:
Instructions:


# Inside your ZDN folder (v2.1 and later), there is a hidden folder called "Advanced" containing a .zip file. Unzip this file
# Inside ZDN, "save as" an .accde file and place this on your network drive somewhere.
# Right-click on the ZDN.bat file (do not open it), and select "Edit"
# Inside your ZDN folder (v2.1 and later), there is a hidden folder called "Advanced" containing a text file.
# Compare the code below to the code in the file. Find the three bolded sections below and change those to your local paths.
# Edit the text file, and change the bolded parts (shown below) to your own local paths and your institution name.
# Save and close your file.
# Save your file and remove the ".txt" extension, leaving it as a ".bat" file.
# Right-click on the Zoo Diet NaviGator shortcut (do not open it), and select "Properties"
# Right-click on the Zoo Diet NaviGator shortcut (do not open it), and select "Properties"
# Change the "Target" to wherever you just saved the .bat file.
# Change the "Target" to wherever you just saved the .bat file.
Line 26: Line 26:
# Double-click the shortcut to make sure everything is working correctly.  If so:
# Double-click the shortcut to make sure everything is working correctly.  If so:
## NaviGator should open
## NaviGator should open
## A new folder should appear on your hard drive at C:\Data
## A new folder should appear on your hard drive at C:\ZDN_Data
## Inside C:\Data there will be a hidden folder called "Nutrition_Database"
## Inside C:\ZDN_Data there will be a hidden folder called "Nutrition_Database"
## Inside that folder should be two items: A folder called "BackendBackups", which is where your backups will live.  Every time ANYONE opens NaviGator using the shortcut, a backup copy of the data will be copied to their local C: drive. You must decide whether this is acceptable data security for you or not. It is helpful for backups, but obviously there will be many copies of your data floating around (hidden, but there). If you do not want this behavior, remove those lines of the code below.
## Inside that folder should be two items: A folder called "BackendBackups", which is where your backups will live.  Every time ANYONE opens NaviGator using the shortcut, a backup copy of the data will be copied to their local C: drive. You must decide whether this is acceptable data security for you or not. It is helpful for backups, but obviously there will be many copies of your data floating around (hidden, but there). If you do not want this behavior, remove those lines of the code below.
## There will also be a local (C: drive) copy of the NaviGator front end that will always be the most recent version. So, every time you (the admin!) update NaviGator in its original location, everyone will get those changes the next time they run the script as a new copy will get downloaded each time.
## There will also be a local (C: drive) copy of the NaviGator front end that will always be the most recent version. So, every time you (the admin!) update NaviGator in its original location, everyone will get those changes the next time they run the script as a new copy will get downloaded each time.
# Copy the shortcut to somewhere public and easily find-able by your users(shared drive, SharePoint, etc.).  
# ''Copy'' the shortcut to somewhere public and easily find-able by your users (shared drive, SharePoint, etc.).  
# Tell everyone where to find the NaviGator shortcut.  They should run the shortcut from that location or copy the shortcut to their local drive/desktop. They should never open the .accdb file directly - only the shortcut.  It's best if they don't even know where the original file lives. Occasionally, users will move the shortcut instead of copy it and you'll have to replace it with a new copy.  That's why you COPIED the shortcut in step 10 instead of moved it ;)
# Tell everyone where to find the NaviGator shortcut.  They should run the shortcut from that location or copy the shortcut to their local drive/desktop. They should never open the .accde file directly - only the shortcut.  It's best if they don't even know where the original file lives. Occasionally, users will move the shortcut instead of copy it and you'll have to replace it with a new copy.  That's why you COPIED the shortcut in step 10 instead of moved it ;)
< [[Backups and Emergencies]]
< [[Backups and Emergencies]]


Line 38: Line 38:
== The batch file ==
== The batch file ==


*Don't worry if you don't understand the code below.  You can follow along by reading the comments.
*Don't worry if you don't understand the code below.  You can follow along by reading the comments (marked with REM (= "remark")).
* In batch files, any line with REM in front is treated as a comment (i.e. not run).
* You can modify this for your institution's needs by replacing the bold paths in the "Set Local Paths Here" section with the paths to your folders. All folder paths should end in \.
* You can modify this for your institution's needs and policies by removing (or adding) sections below.
* To use this script, from within Access, "Save as" your database as a compiled .accde file. This is an un-editable compiled copy of the program for your users to use (they can still change diets and other animal data, just not change the program itself).  If you are developing this (making changes to reports, queries, forms, etc.), then you should keep working in the .accdb version for development.  Always save a copy of your edited .accdb version for your own use.  When you are ready to distribute, "Save as" to an .accde file for your users to use.


----
----
<code>
REM This clears the screen and goes to an error if MS Access is not installed on the computer.
cls
@echo off
cls
REM Check that this is the path to Access on your machine. This is the default location and you should not need to change this unless you have a unique Access installation.
IF NOT EXIST "C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE" GOTO :NoAccess
REM ===============================================================================
REM ********************    SET LOCAL PATHS HERE!      ***************************
REM ===============================================================================
REM Location to save local (C drive) backups
set "LocalLoc='''''C:\ZDN_Data\'''''"
REM Location of ZDN Support Files folder
set "SupportFilesLoc='''''J:\MyFolder\ZDN\ZDN Support Files\'''''"
REM Location of ZDN App USER master copy (on the network, in .accde format)
set "AppLoc='''''J:\MyFolder\ZDN\'''''"


@echo off


 
 
REM This is a cute welcoming graphic
 
echo        +-+-+-+-+-+-+-+ +-+-+               
REM ===============================================================================
echo          W e l c o m e  t o               
REM ************    ZDN ADMINS - SET LOCAL PATHS HERE!      ********************
echo  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
REM ===============================================================================
echo    Z o o  D i e t  N a v i G a t o r
 
echo  +-+-+-+ +-+-+-+-+ +-+-+-+-+-+-+-+-+-+
REM Notes: When using this script, it is assumed that you (the developer/admin) are working and making updates
echo.
REM to the master .accdb file, and have "Save As..."-ed a COPY of this as a compiled .accde file for your users to use.
echo              .-._  _ _ _ _ _ _ _ _
 
echo  .-<nowiki>''</nowiki>-.__.-'00  '-' ' ' ' ' ' ' ' '-.
REM Location to save local (C drive) backups (end with slash\)
echo  '.___ '    .   .--_'-' '-' '-' _'-' '._
set "LocalLoc=C:\ZDN_Data\"
echo    V: V 'vv-'  '_  '.      .'  _..' '.'.
 
echo      '=.____.=_.--'  :_.__.__:_  '.  : :
REM Location of ZDN Support Files folder (end with slash\)
echo              (((____.-'        '-.  /  : :
set "SupportFilesLoc=J:\Data\ZDN\ZDN Files (ANC Diet Info)\ZDN Support Files\"
echo                              (((-'\ .' /
 
echo                              _____..'  .'
 
echo                            '-._____.-'
REM Location of ZDN App USER master copy (on the network, in .accde format) (end with slash\)
set "AppLoc=J:\Data\ZDN\ZDN Files (ANC Diet Info)\"
REM This creates a timestamp that is used later on when naming backup files
 
REM Short name (no punctuation) of your institutions
echo Putting on my PPE...
set "InstName=AGreatZoo"
 
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
REM Check that this is the path to Access on your machine. This is the default location and you should not need to change this unless you have a unique Access installation.
IF NOT EXIST "C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE" GOTO :NoAccess
set "YYYY=%dt:~0,4%"
 
set "MM=%dt:~4,2%"
 
set "DD=%dt:~6,2%"
REM ================================================================================
set "HH=%dt:~8,2%"
REM ================    DON'T EDIT BELOW THIS LINE      ===========================
set "Min=%dt:~10,2%"
REM ================================================================================
set "Sec=%dt:~12,2%"
 
set "fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%"
 
set "shortstamp=%YYYY%-%MM%-%DD%"
 
 
 
REM This logs each time a user opens ZDN. This can be useful if you are trying to understand who is using the software and why.
 
 
echo Hauling hay...
 
 
ECHO OPEN %fullstamp% - %ComputerName% - %USERNAME% >> "%SupportFilesLoc%Logs\zdn_userlog - "%YYYY%.log"
 
 
REM This creates the nested folders on the local hard drive if they don’t already exist
 
REM This clears the screen and goes to an error if MS Access is not installed on the computer.
echo Chopping carrots...
cls
@echo off
mkdir "%LocalLoc%Nutrition_Database\BackendBackups" 2>NUL
cls
attrib +h "%LocalLoc%Nutrition_Database" /s /d  >nul &REM This hides the folder
 
if exist "%LocalLoc%Nutrition_Database\*.accde" (
 
    del "%LocalLoc%Nutrition_Database\*.accde"  >nul
REM This is a cute welcoming graphic
)
echo        +-+-+-+-+-+-+-+ +-+-+               
echo          W e l c o m e  t o               
echo  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
echo    Z o o  D i e t   N a v i g a t o r
echo   +-+-+-+ +-+-+-+-+ +-+-+-+-+-+-+-+-+-+
echo.
REM This copies the frontend to the local folder.
echo              .-._   _ _ _ _ _ _ _ _
echo  .-''-.__.-'00 '-' ' ' ' ' ' ' ' '-.
echo Fileting fish...
echo  '.___ '    .  .--_'-' '-' '-' _'-' '._
echo    V: V 'vv-'  '_  '.      .' _..' '.'.
xcopy /s "%AppLoc%ZDN_v*.accde" %LocalLoc%Nutrition_Database\ZDN.accde* /H /c /q /y >Nul
echo     '=.____.=_.--'  :_.__.__:_  '.  : :
if ERRORLEVEL 1 goto :ERROR
echo              (((____.-'       '-.  /  : :
cd "%LocalLoc%Nutrition_Database" >nul
echo                              (((-'\ .' /
echo                              _____..' .'
REM This copies the backend data to the local folder as a backup.  ZDN doesn't use it from here. You will have to copy it to the main 'ZDN Support Files' folder to use it.
echo                            '-._____.-'
 
echo Bundling browse...
REM This creates a timestamp that is used later on when naming backup files
 
echo Putting on my PPE...
if not exist %LocalLoc%Nutrition_Database\BackendBackups\%shortstamp%-ZDN-databackup.accdb (
 
echo   * Backing up the data to the C drive once a day
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
xcopy /y "%SupportFilesLoc%Datafiles\*.accdb"  "%LocalLoc%Nutrition_Database\BackendBackups\BackupC-be.accdb*"   >nul
 
  cd /d "%SupportFilesLoc%Datafiles\Previous Versions\"
set "YYYY=%dt:~0,4%"
ren %LocalLoc%Nutrition_Database\BackendBackups\BackupC-be.accdb %shortstamp%-ZDN-databackup.accdb
set "MM=%dt:~4,2%"
)
set "DD=%dt:~6,2%"
   
set "HH=%dt:~8,2%"
set "Min=%dt:~10,2%"
set "Sec=%dt:~12,2%"
REM This keeps the most recent 21 files
set "fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%"
set "shortstamp=%YYYY%-%MM%-%DD%"
echo Slicing strawberries...
 
 
for /F "skip=21 eol=: delims=" %%i in ('dir /b /o-d') do del %%i"
REM This logs each time a user opens ZDN. This can be useful if you are trying to understand who is using the software and why.
 
   
echo Hauling hay...
REM This copies the backend data to the network folder as a backup. ZDN doesn't use it from here. You will have to copy it to the main 'ZDN Support Files' folder to use it.
 
ECHO OPEN %fullstamp% - %ComputerName% - %USERNAME% >> "%SupportFilesLoc%Logs\zdn_userlog - "%YYYY%.log"
echo Prepping pinkies...
 
REM This creates the nested folders on the local hard drive if they don�t already exist
echo  * Backing up the data to the J drive every time
 
xcopy /y "%SupportFilesLoc%Datafiles\*.accdb"   "%SupportFilesLoc%Datafiles\Previous Versions\Backup-be.accdb*"  >nul
echo Chopping carrots...
cd /d "%SupportFilesLoc%Datafiles\Previous Versions\"
 
ren Backup-be.accdb %fullstamp%-ZDN-databackup.accdb
mkdir "%LocalLoc%Nutrition_Database\BackendBackups" 2>NUL
attrib +h "%LocalLoc%Nutrition_Database" /s /d  >nul &REM This hides the folder
del "%LocalLoc%Nutrition_Database\*.accde"  >nul
REM This keeps the most recent 9 files
 
 
echo Delivering diets...
REM This copies the frontend to the local folder.
 
for /F "skip=9 eol=: delims=" %%i in ('dir /b /o-d *.accdb') do del %%i"  
echo Fileting fish...
 
xcopy /s "%AppLoc%ZDN_v*.accde" %LocalLoc%Nutrition_Database\ZDN.accde* /H /c /q /y >Nul
if ERRORLEVEL 1 goto :ERROR
cd "%LocalLoc%Nutrition_Database" >nul
REM These lines navigate to the folder and open the database.  To the user, it just looks like they opened the database.
 
REM This copies the backend data to the local folder as a backup.  ZDN doesn't use it from here. You will have to copy it to the main 'ZDN Support Files' folder to use it.
echo Ready to feed some animals!
 
echo Bundling browse...
start %LocalLoc%Nutrition_Database\ZDN.accde
 
TIMEOUT /T 10
 
goto :EOF
if not exist %LocalLoc%Nutrition_Database\BackendBackups\%shortstamp%-%InstName%-ZDN-databackup.accdb (
echo  * Backing up the data to the C drive once a day
xcopy /y "%SupportFilesLoc%Datafiles\%InstName%*.accdb"  "%LocalLoc%Nutrition_Database\BackendBackups\BackupC-be.accdb*"  >nul
<nowiki>:</nowiki>ERROR
cd /d "%SupportFilesLoc%Datafiles\Previous Versions\"
ECHO "Oops - Can't find NaviGator."
ren %LocalLoc%Nutrition_Database\BackendBackups\BackupC-be.accdb %shortstamp%-%InstName%-ZDN-databackup.accdb
ECHO "Please tell your ZDN admin you got a J drive error."
)
 
pause
 
 
<nowiki>:</nowiki>NoAccess
REM This keeps the most recent 21 files
ECHO Oops - No copy of MS Access detected!
 
ECHO.
echo Slicing strawberries...
ECHO Please tell your ZDN admin that computer '%COMPUTERNAME:~-4%' is missing Access.
 
ECHO.
for /F "skip=21 eol=: delims=" %%i in ('dir /b /o-d') do del %%i"
ECHO.
 
 
pause
REM This copies the backend data to the network folder as a backup.  ZDN doesn't use it from here. You will have to copy it to the main 'ZDN Support Files' folder to use it.
 
<nowiki>:</nowiki>EOF
echo Prepping pinkies...
 
echo  * Backing up the data to the J drive every time
xcopy /y "%SupportFilesLoc%Datafiles\%InstName%*.accdb"  "%SupportFilesLoc%Datafiles\Previous Versions\Backup-be.accdb*"  >nul
cd /d "%SupportFilesLoc%Datafiles\Previous Versions\"
ren Backup-be.accdb %fullstamp%-%InstName%-ZDN-databackup.accdb
 
 
REM This keeps the most recent 9 files
 
echo Delivering diets...
 
for /F "skip=9 eol=: delims=" %%i in ('dir /b /o-d *.accdb') do del %%i"
 
 
 
REM These lines navigate to the folder and open the database.  To the user, it just looks like they opened the database.
 
echo Ready to feed some animals!
 
start %LocalLoc%Nutrition_Database\ZDN.accde
TIMEOUT /T 10
goto :EOF
 
 
:ERROR
ECHO "Oops - Can't find NaviGator."
ECHO "Please tell your ZDN admin you got a J drive error."
 
pause
 
:NoAccess
ECHO Oops - No copy of MS Access detected!
ECHO.
ECHO Please tell your ZDN admin that computer '%COMPUTERNAME:~-4%' is missing Access.
ECHO.
ECHO.
 
pause
 
:EOF
</code>

Latest revision as of 08:31, 4 June 2024

This page assumes that at least one person has ZDN up and running on their computer successfully, and now you want to add additional users at your institution.

The manual way (1-2 users)

This process is fine for a few users. When there are updates to ZDN, you will just repeat this process.

  • Ensure the ZDN Support Files folder is on a shared drive (See the Installation Guide for details).
  • Configure the ZDN program (Settings) to connect to the shared drive
  • Give each user a fresh copy of the ZDN program (program only, not the Support Files folder)


If you have more than a few users or make regular updates, you will want to automate the distribution process. This has several benefits, including being able to add additional steps to the script such as making backups along the way

The best way to distribute to multiple users is via a Windows batch file.

A batch file is a script that does multiple things. Below is the text of a batch file with notes about what each section does. This batch file is included in your original ZDN download (v2.1 and later). You do not need to copy from here. It is included here to highlight the three spots where you need to edit the code to match your local install.

Instructions:

  1. Inside ZDN, "save as" an .accde file and place this on your network drive somewhere.
  2. Inside your ZDN folder (v2.1 and later), there is a hidden folder called "Advanced" containing a text file.
  3. Edit the text file, and change the bolded parts (shown below) to your own local paths and your institution name.
  4. Save your file and remove the ".txt" extension, leaving it as a ".bat" file.
  5. Right-click on the Zoo Diet NaviGator shortcut (do not open it), and select "Properties"
  6. Change the "Target" to wherever you just saved the .bat file.
  7. Change the "Start in" to the same location, just without the filename at the end.
  8. Both values should be in quotes. Neither should end with a \.
  9. Double-click the shortcut to make sure everything is working correctly. If so:
    1. NaviGator should open
    2. A new folder should appear on your hard drive at C:\ZDN_Data
    3. Inside C:\ZDN_Data there will be a hidden folder called "Nutrition_Database"
    4. Inside that folder should be two items: A folder called "BackendBackups", which is where your backups will live. Every time ANYONE opens NaviGator using the shortcut, a backup copy of the data will be copied to their local C: drive. You must decide whether this is acceptable data security for you or not. It is helpful for backups, but obviously there will be many copies of your data floating around (hidden, but there). If you do not want this behavior, remove those lines of the code below.
    5. There will also be a local (C: drive) copy of the NaviGator front end that will always be the most recent version. So, every time you (the admin!) update NaviGator in its original location, everyone will get those changes the next time they run the script as a new copy will get downloaded each time.
  10. Copy the shortcut to somewhere public and easily find-able by your users (shared drive, SharePoint, etc.).
  11. Tell everyone where to find the NaviGator shortcut. They should run the shortcut from that location or copy the shortcut to their local drive/desktop. They should never open the .accde file directly - only the shortcut. It's best if they don't even know where the original file lives. Occasionally, users will move the shortcut instead of copy it and you'll have to replace it with a new copy. That's why you COPIED the shortcut in step 10 instead of moved it ;)

< Backups and Emergencies

> Uses

The batch file

  • Don't worry if you don't understand the code below. You can follow along by reading the comments (marked with REM (= "remark")).
  • You can modify this for your institution's needs by replacing the bold paths in the "Set Local Paths Here" section with the paths to your folders. All folder paths should end in \.
  • To use this script, from within Access, "Save as" your database as a compiled .accde file. This is an un-editable compiled copy of the program for your users to use (they can still change diets and other animal data, just not change the program itself). If you are developing this (making changes to reports, queries, forms, etc.), then you should keep working in the .accdb version for development. Always save a copy of your edited .accdb version for your own use. When you are ready to distribute, "Save as" to an .accde file for your users to use.

REM This clears the screen and goes to an error if MS Access is not installed on the computer.
	cls
	@echo off
	cls

REM Check that this is the path to Access on your machine. This is the default location and you should not need to change this unless you have a unique Access installation.
	IF NOT EXIST "C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE" GOTO :NoAccess

REM ===============================================================================
REM ********************     SET LOCAL PATHS HERE!      ***************************
REM ===============================================================================


	REM Location to save local (C drive) backups
		set "LocalLoc=C:\ZDN_Data\"

	REM Location of ZDN Support Files folder
		set "SupportFilesLoc=J:\MyFolder\ZDN\ZDN Support Files\"

	REM Location of ZDN App USER master copy (on the network, in .accde format)
		set "AppLoc=J:\MyFolder\ZDN\"


REM This is a cute welcoming graphic
	echo         +-+-+-+-+-+-+-+ +-+-+                
	echo          W e l c o m e   t o                 
	echo   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
	echo    Z o o   D i e t   N a v i G a t o r 
	echo   +-+-+-+ +-+-+-+-+ +-+-+-+-+-+-+-+-+-+
	echo.
	echo              .-._   _ _ _ _ _ _ _ _
	echo   .-''-.__.-'00  '-' ' ' ' ' ' ' ' '-.
	echo   '.___ '    .   .--_'-' '-' '-' _'-' '._
	echo    V: V 'vv-'   '_   '.       .'  _..' '.'.
	echo      '=.____.=_.--'   :_.__.__:_   '.   : :
	echo              (((____.-'        '-.  /   : :
	echo                               (((-'\ .' /
	echo                              _____..'  .'
	echo                             '-._____.-'

REM This creates a timestamp that is used later on when naming backup files

	echo Putting on my PPE...

		for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"

		set "YYYY=%dt:~0,4%"
		set "MM=%dt:~4,2%"
		set "DD=%dt:~6,2%"
		set "HH=%dt:~8,2%"
		set "Min=%dt:~10,2%"
		set "Sec=%dt:~12,2%"
		set "fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%"
		set "shortstamp=%YYYY%-%MM%-%DD%"


REM This logs each time a user opens ZDN. This can be useful if you are trying to understand who is using the software and why.

	echo Hauling hay...

		ECHO OPEN %fullstamp% - %ComputerName% - %USERNAME% >> "%SupportFilesLoc%Logs\zdn_userlog - "%YYYY%.log"

REM This creates the nested folders on the local hard drive if they don’t already exist

	echo Chopping carrots...

		mkdir "%LocalLoc%Nutrition_Database\BackendBackups" 2>NUL
		attrib +h "%LocalLoc%Nutrition_Database" /s /d  >nul &REM This hides the folder
		if exist "%LocalLoc%Nutrition_Database\*.accde" (
		    del "%LocalLoc%Nutrition_Database\*.accde"  >nul
		)


		


REM This copies the frontend to the local folder.  

	echo Fileting fish...

		xcopy /s "%AppLoc%ZDN_v*.accde" %LocalLoc%Nutrition_Database\ZDN.accde* /H /c /q /y >Nul
		if ERRORLEVEL 1 goto :ERROR
		cd "%LocalLoc%Nutrition_Database" >nul

REM This copies the backend data to the local folder as a backup.  ZDN doesn't use it from here. You will have to copy it to the main 'ZDN Support Files' folder to use it.

	echo Bundling browse...


if not exist %LocalLoc%Nutrition_Database\BackendBackups\%shortstamp%-ZDN-databackup.accdb (
		echo   * Backing up the data to the C drive once a day
		xcopy /y "%SupportFilesLoc%Datafiles\*.accdb"   "%LocalLoc%Nutrition_Database\BackendBackups\BackupC-be.accdb*"   >nul
cd /d "%SupportFilesLoc%Datafiles\Previous Versions\"
		ren %LocalLoc%Nutrition_Database\BackendBackups\BackupC-be.accdb %shortstamp%-ZDN-databackup.accdb
)



REM This keeps the most recent 21 files

	echo Slicing strawberries...

		for /F "skip=21 eol=: delims=" %%i in ('dir /b /o-d') do del %%i" 


REM This copies the backend data to the network folder as a backup.  ZDN doesn't use it from here. You will have to copy it to the main 'ZDN Support Files' folder to use it.

	echo Prepping pinkies...

		echo   * Backing up the data to the J drive every time
		xcopy /y "%SupportFilesLoc%Datafiles\*.accdb"   "%SupportFilesLoc%Datafiles\Previous Versions\Backup-be.accdb*"   >nul
		cd /d "%SupportFilesLoc%Datafiles\Previous Versions\"
		ren Backup-be.accdb %fullstamp%-ZDN-databackup.accdb


REM This keeps the most recent 9 files

	echo Delivering diets...

		for /F "skip=9 eol=: delims=" %%i in ('dir /b /o-d *.accdb') do del %%i" 



		
REM These lines navigate to the folder and open the database.  To the user, it just looks like they opened the database.

	echo Ready to feed some animals!

		start %LocalLoc%Nutrition_Database\ZDN.accde 
		TIMEOUT /T 10
		goto :EOF


:ERROR
	ECHO "Oops - Can't find NaviGator."
	ECHO "Please tell your ZDN admin you got a J drive error."

	pause

:NoAccess
	ECHO Oops - No copy of MS Access detected!
	ECHO.
	ECHO Please tell your ZDN admin that computer '%COMPUTERNAME:~-4%' is missing Access.
	ECHO.
	ECHO.

	pause

:EOF