How to know when File is done FTPing?

  • We have a straight-forward package: Text File to Table DTS.

    Problem is Text file is 200mb and takes quite a while to arrive intact. I can use an Active X script to see if the file is there, but I really need to see if the file is DONE transfering.

    Any insight on this one?

    Edited by - mark_maddison on 07/17/2003 1:08:08 PM

  • This was removed by the editor as SPAM

  • Check the file size. One minute later check it again - if same, you can assume its finished.

    If you aren't on a fast network then stretch it out to five minute checks.

    Another alternative is to not use the FTP object, instead running a batch file that does the ftp then as the next batchfile step renames the file. You can then just watch for the renamed file.

  • Or put a very small tickler file (a few bytes) that transfers right behind it. The tickler file serves as the semaphore to tell you the other file is done.

    K. Brian Kelley

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/shop/product.asp?ProductID=NI-SQL1

    K. Brian Kelley
    @kbriankelley

  • Like Brians solution better. We used to do that in one of our projects.

    A mainframe would put a bunch of files on our system, and then write the 'DONE' file.

    Problem with the solution of Nick is that you can't be sure that the transfer was successful. Suppose the connection was cut, you might be importing only half of the data!

  • I use the tickler file myself. If you're really concerned that you don't have it all, put the file length in the tickler. You can also list all files concerned if you're moving data as a set of files.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Thank you for the responses

    I like the idea of the tickler file and will give that a try.

    Cheers

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply