On Aug 31, 2006, at 10:13, Joseph Nastasi wrote:


On Aug 31, 2006, at 1:20 AM, David Glass wrote:

I suppose it is possible that the last file isn't completely present, but there is a delay between receiving all the files and processing through the files to reach the final file; one that I would have thought would be long enough to account for any 'file not available/complete/ready' issues. I'd guess the average is probably 15 - 30 seconds, obviously less if there is only one file.

Given that you are using FTP Suite, the FTP Status class should provide you with the gating status you need to know when a file is ready to process. The Successful_FTP event is what you should be using. I'm not sure why you'd have to put in a delay for safety's sake.


Apologies. I didn't mean I had put in a delay, only that the processing does not happen instantaneously following the end of the receiving. The receiving happens, then when that is done I clear a listbox, get the list of files available for processing, and add their names (and line counts) one at a time to the listbox. It is when trying to read the last file to determine the line count that I hit the error.

If your using the Sequences instead of the Commands, I'd suggest you look into the latter as they give much better control. Either way, the Successful_FTP event in FTP Status Class will only fire if the file is 100% complete.


I believe I had some trouble with the Sequences (or I couldn't wrap my head around how to implement them) so I am using the Commands.

My download code looks like this:

FTPDownload(strInboundFile as String) as boolean
  blnFTPDone = False
  blnFTPError = False

  ftpSession.SetLocalFolderItem(folInboundFolder)
  ftpSession.AddFileName strInboundFile
  ftpSession.GetSingleFile

  Do
  Loop Until blnFTPDone = True
  Return(NOT blnFTPError)
---

And gets called in this loop:

    for intCounter = 0 to intFileCount
if self.FTPDownload(wndProgress.lbUpdates.Cell(intCounter, 1)) = False then
        wndProgress.lbUpdates.CellCheck(intCounter, 0) = False
      else
        wndProgress.lbUpdates.CellCheck(intCounter, 0) = True
wndProgress.stCount.Caption = str(val (wndProgress.stCount.Caption) + 1)
      end if

      if intCounter mod 10 = 0 then
        wndProgress.lbUpdates.ScrollPosition = intCounter - 5
      end if

    next

Is there something I'm missing in this process? If so, what would it be that would not cause issues on OS X, but cause issues on WinXP?

--
David Glass - Gray Matter Computing
graymattercomputing.com - corepos.com
559-303-4915

Apple Certified Help Desk Specialist

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to