FTP Remote file properties

  • I have several SSIS packages that begin by going off to remote servers and picking up files left by outside agencies.  Most of the agencies that drop their files onto our FTP server,  and those packages delete the files once they have been successfully retrieved and processed.  That way, if the outside agency fails to deliver the daily file, the package fails, notification is emailed to a number of folks in the office and action can be taken. There is one package however, in which the file is delivered to the outside agency's FTP server and my package picks it up from there.  I do not have permission to delete files from that server.  Today, a user came to me with a question about the data and it was discovered that the other agency had not updated the file for a while and for the past three weeks, my package has been happily processing the same file over and over and over.

    My question:  Is there a way to determine the creation date of the file on the remote server?  Once I ftp it to my server, the creation date/time is the date/time the task executed. I need to know when it was placed on the other agency's server.

  • This was removed by the editor as SPAM

  • Try issuing a DIR or ls to the remote FTP server once you log in.  You can then parse the result to get the date of the file.

  • Here's a site that has excellent code on doing this:

    http://www.codeproject.com/vb/net/FtpClient.asp

     

  • That looks like it just might do the trick.  I'll give it a try.

    Thank you.

Viewing 5 posts - 1 through 4 (of 4 total)

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