[AccessD] A2K: Determine what needs to be copied from FTP Location

Gustav Brock Gustav at cactus.dk
Fri Mar 16 05:12:24 CDT 2007


Hi Darren

I guess your requirements leave out a simple shelling to ftp.exe -s?

If so I can strongly recommend to use 3D-FTP:

     http://www.3dftp.com/api.htm 

It is buyware at a ridiculous low cost of USD 40, and it has a very well documented API.

You can run it with a minimum of code:

    Set FTP = CreateObject("ftp.API")
    With FTP
      .Connect("ftp.3dftp.com")
      .ChDir(REMOTE_DIR, "/pub/")
      .ChDir(LOCAL_DIR, "c:\temp")
      .AddToQueue(REMOTE_DIR, "*.*")
      .TransferQueue()
      .Disconnect()
    End With
    Set FTP = Nothing

but you have, of course, many more options.

Best of all, it runs rock steady (I've never seen it fail) and at an
extreme speed because it is multithreaded. I used it recently for an app
which frequently has to upload about 2000 files by the push of a button.
Here it was a pleasure to have a window showing the progress and success
of the upload.

/gustav

>>> darrend at nimble.com.au 16-03-2007 06:58 >>>
Hi all

 

I am opening FTP connections from within Access by using the following syntax

 

Call Shell("explorer HYPERLINK
"ftp://username:password@somehost.com/"ftp://username:password@somehost.com" ,
1)

 

This opens things up in a normal windows explorer window * simple for dragging
and dropping * cool works well

 

What I want to automate is*

 

1        I need to determine the last file I copied from this FTP location to my
machine 

 

2        Then read from the FTP folder to determine what files are 'new' * i.e.
Files that have been put there since I did my last download (as per point 1)

 

3        Then once I have determined what files I HAVE NOT got * need to copy
them to a local folder on my machine

 

The files all have a sequential naming convention based on date * 

 

EG I may have downloaded to my local folders, all files up to and including
WDL320070312 (File created 12th March 2007)

 

But let's say in the FTP location there are 3 files there I don't have EG
-WDL320070313, WDL320070314 and WDL320070315

 

Need to determine these 3 files need downloading then need to copy these 3 files
locally

 

Make sense?

 

Any clues/suggestions? 

 

Many thanks in advance

 

Darren





More information about the AccessD mailing list