Hi gang
I've made a minor change to my deployment and update script for local front ends. You can read the article and get the script at http://www.thatlldoit.com/Pages/howtosarticles.aspx
The only change was I added a couple lines to delete all files and sub folders before copying the files from the server. This is done in the procedure named GetDB(). The code is below. the two new lines are:
'Delete all existing sub folders & files.
fs.DeleteFolder cLOCPATH & "\*"
fs.DeleteFile cLOCPATH & "\*.*"
I should have thought of that to start with. Thanks to Bill S. for asking about it.
Sub GetDB()
'Purpose : Copy latest files from server to local folder
'DateTime : 1/11/2007 13:45
'Author : Bill Mosca
If Not fs.FolderExists(cLOCPATH) Then
fs.CreateFolder (cLOCPATH)
End If
'Delete all existing sub folders & files.
fs.DeleteFolder cLOCPATH & "\*"
fs.DeleteFile cLOCPATH & "\*.*"
fs.CopyFile cSVRPATH & "\" & cTXTFILE, cLOCPATH & "\", True
fs.CopyFile cSVRPATH & "\" & cZip, cLOCPATH & "\", True
Call Unzip(cLOCPATH & "\" & cZip, cLOCPATH)
'Delete zip file.
fs.DeleteFile cLOCPATH & "\" & cZip
End Sub
Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (1) |
Tidak ada komentar:
Posting Komentar