[AccessD] Updating front-end via batch file?

Foote, Chris Chris.Foote at uk.thalesgroup.com
Tue Oct 19 02:14:27 CDT 2004


Morning Christopher!

Sorry I'm a day late with this.

Below is the batch file that I use to update an Access FE file on user's
local C: drives.

The file 'lives' on the same network 'share' as the current FE file
(\\<server>\<path>\ChrisFoote\). 

It checks to see if the locally stored file has the same filename as the
latest version (this is 'hard coded' in the batch file).

If it is, it runs Access and opens the FE file and quits the batch file.

If the file does not exist it makes the required sub-directory, deletes any
existing older version of the file, and copies the latest version to the new
directory.

Access is then run and the new FE file opened.

The users of this db have a desktop link to this batch file.

HTH - Chris Foote

(Now I come to describe the operation of this bat file I realise that it
could be improved somewhat! Still, it seems to work ok ;-O)

----------(Bat file)
@echo off
if not exist "c:\Program Files\jamling\Jamling-a14.mdb" goto getdb:
goto startdb
:getdb
md "c:\Program Files\jamling" >nul
del "c:\Program Files\jamling\Jamling*.mdb" >nul
copy "\\<server>\<path>\ChrisFoote\Jamling-a14.mdb" "c:\Program
Files\jamling" >nul
:startdb
start "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "c:\Program
Files\jamling\Jamling-a14.mdb"
exit

> -----Original Message-----
> From: Chris Foote (Spike) [mailto:spikee at oatlandspark.org.uk]
> Sent: Friday, October 15, 2004 9:18 PM
> To: Access Developers discussion and problem solving
> Subject: RE: [AccessD] Updating front-end via batch file?
> 
> 
> Hi Christopher!
> 
> I have a batch file at work doing just the job you are after.
> 
> If you can wait 'til Monday I'll send it to you then.
> 
> Regards!
> Chris Foote
> 
> 
> <All outgoing e-mail messages are swept for malware using 
> Norton Anti-virus
> 9.05.15 with virus definitions dated 12th October 2004>
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Christopher
> Hawkins
> Sent: 15 October 2004 20:39
> To: accessd at databaseadvisors.com
> Subject: [AccessD] Updating front-end via batch file?
> 
> 
> Hello, all.
> 
> I have a client who is constantly tinkering with his home-grown
> Access solution and is constantly rolling out updates (against my
> advice, of course).
> 
> I was about to set him up with a simple batch file that just uses
> COPY [origin] [destination]  to copy  the latest version of the .mdb
> from a folder on the server to a user's machine.  But before I do, I
> want to know if it is possible to get a little fancier.
> 
> I would like the batch file to a) compare the filename on the user's
> machine to the filename on the server, and then b) do the copy if the
> names are different, or c) NOT do the copy if the names are the same
> (my client likes to put the version number in the filename).
> 
> Is this too much to ask of the humble batch file?
> 
> 
> -Christopher-
> 
> P.S.
> And for those of you who wonder why I don't use a vbscript file, this
> client swaps eMachines and other budget boxes in and out of his
> business based on what's on sale at Costco that week (again, against
> my advice).  I can't be sure that new boxes he brings in will have
> WSH or any of the complementary components installed on the
> bastardized version of WinXP that ships with a lot of thses crap
> boxes.  But I know that batch files work on everything from Win95 up.
> ;)
> Respectfully,
> 
> Christopher Hawkins
> Software Developer
> (559) 687-7591
> http://www.christopherhawkins.com
> 
> 
> --
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> 
> -- 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 



More information about the AccessD mailing list