[AccessD] Ensuring FTP completion

John Colby jwcolby at ColbyConsulting.com
Tue Jan 17 06:44:25 CST 2006


Gustav,

No, I purchased 3d-ftp but I did so for it's user interface ftp (very nice
and reliable), I never tried automating it.  I have just downloaded the docs
and the api and will look at it.  I LOVE 3d-FTP for just using it from the
desktop.

John W. Colby
www.ColbyConsulting.com 


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Tuesday, January 17, 2006 5:43 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Ensuring FTP completion

Hi John

Didn't you test out 3D-FTP? Piece of cake:

  Const cintLocalDir    As Integer = 0
  Const clngNoError     As Long = 0

  <snip>

  ' Add the database file to the queue.
  Call .AddToQueue(cintLocalDir, cstrFileName, 0, 0)

  <snip>

  intFileCount = .GetQueueItemCount()
  If intFileCount > 0 Then
    lngReturn = .TransferQueue()
    DoCmd.Beep
    If lngReturn = clngNoError Then
      strMsgPrompt = "Transfer of files were successful."
      lngMsgStyle = vbInformation + vbOKOnly
    Else
      strMsgPrompt = "An error occured during transfer of files!"
      lngMsgStyle = vbExclamation + vbOKOnly
    End If
  Else
    strMsgPrompt = "No files to transfer."
    lngMsgStyle = vbExclamation + vbOKOnly
  End If

</snip

If you have to work with the command line FTP or similar you may pipe the
screen output to a log file and parse that. No fun.
Or perform the ultimate test: Upload the file and download it right after.
Then compare the two files. This, of course, doubles the effective transfer
time.

If you are transferring one file only, you can also as Reuben use a small
external util, wcl_ftp:

' WCL_FTP is freeware and is obtainable from
'   http://www.pacific.net/~ken/software/

which can be run by an excellent code module which is for download too.

/gustav

>>> jwcolby at ColbyConsulting.com 16-01-2006 21:15 >>>
I am working on a system to FTP an MDB file to a web directory.  I need to
know that the file got there correctly.  Does anyone do this, and if so,
what tools do you use for the FTP up/down and how do you check to ensure
that the transfer completed?  I am going to need to do something like FTP up
under one name, then rename / delete the existing and rename the new to the
filename of the existing.  This has to be bulletproof though so I need to
know that it worked.

John W. Colby
www.ColbyConsulting.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