Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Multiuser / Networking / February 2005

Tip: Looking for answers? Try searching our database.

Auto FE Updater: copy a folder with files?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mr. T. - 11 Feb 2005 09:13 GMT
Hi,

i'm intending to use Auto FE Updater to copy the FE to the users pc whenever
necessary. So far so good, got it working without problems (let's hope it
stays that way ;-)

But i also have a folder with Word templates that i use from within the
application and they need to be in the same folder as where my FE is being
copied. Is there a possibility to have Auto FE Updater have check if the
templates exist and if not, copy them? Or is there another easy and clean
way of performing this?

Thx in advance,

Thomas
Nikos Yannacopoulos - 11 Feb 2005 11:23 GMT
Thomas,

It's a piece of cake to do that from within Access (your FE) upon
startup. Use an autoexec macro or the On Open event of a switchboard or
main form that opens upon opening the FE (or even a dummy, invisible
form just for the purpose, in lack of the above) to run some simple code
like:

fsource = "\\ServerName\FolderName\SubfolderName\"
ftarget = "C:\LocalFolderName\LocalSubfolderName\"
Set fs = CreateObject("Scripting.FileSystemObject")
Set fldr = fs.GetFolder(fsource)
Set fls = fldr.Files
For Each fl In fls
    If right(fl.Name, 4) = ".dot" Then
        If Dir(ftarget & fl.Name) = ""
            filecopy fsource & fl.Name, ftarget & fl.Name
    End If
    End If
Next
Set fls = Nothing
Set fldr = Nothing
Set fs = Nothing

The code will browse through all files in the source (network) folder,
and for each file with a ".dot" extension (Word template) it will check
if a file with the same name exists in the local folder, and copy it
accross if not.

HTH,
Nikos

> Hi,
>
[quoted text clipped - 11 lines]
>
> Thomas
Fred Boer - 12 Feb 2005 03:43 GMT
Dear Nikos and Thomas:

PMFJI, but IIRC, if you need supporting files to be installed in the same
folder as the FE on the workstations, I believe the AutoFe Updater will
automatically do this for you without any code. Simply put them in the same
folder on the server as the FE, and the AutoFe Updater will copy them to the
workstation if they aren't present. I don't know if it will copy a *folder*,
however.

HTH
Fred Boer

> Thomas,
>
[quoted text clipped - 43 lines]
> >
> > Thomas
Tony Toews - 12 Feb 2005 20:30 GMT
>PMFJI, but IIRC, if you need supporting files to be installed in the same
>folder as the FE on the workstations, I believe the AutoFe Updater will
>automatically do this for you without any code. Simply put them in the same
>folder on the server as the FE, and the AutoFe Updater will copy them to the
>workstation if they aren't present.

Correct.  Thanks.

>I don't know if it will copy a *folder*, however.

No, although that's on my to do list to add this capability.

Tony
--
Tony Toews, Microsoft Access MVP
  Please respond only in the newsgroups so that others can
read the entire thread of messages.
  Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Mr. T. - 14 Feb 2005 08:12 GMT
> PMFJI, but IIRC, if you need supporting files to be installed in the same
> folder as the FE on the workstations, I believe the AutoFe Updater will
[quoted text clipped - 3 lines]
> the
> workstation if they aren't present.
this works indeed

>I don't know if it will copy a *folder*,  however.
this doesn't work, as i tested.

i'll solve it with Nikos' code sample (thx for that!) until Tony has added
this.

Thx for all the help!

Regards,

Thomas
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.