Repeating Execute Process Task/FTP task varying number of times

  • Hello,

    I'm currently looking into using a DTS package to handle downloads of acknowledgement files from an external site. Essentially all I need it to do is check for new files, check that the files are complete, and then download any non-downloaded files to our local server.

    I'm okay with the first two steps, but am having a little difficulty in working out the third. There will always be a variable number of files to download, so my question really is; how would it be possible for me to download new files multiple times, without having a set number that need to be downloaded each time the package is run?

  • How are you checking for new files?

    Can you check the files in the downloaded folder and compare the list with the 'new' files and then just download the missing files?

     

    J

  • This is what I would like to do... I think perhaps I'm a little unclear as to how to use an Execute Process task or FTP task to do this, though. How would I get it to download the files that have been processed since the last download?

  • Is the problem identifying the new files or is the problem downloading the new files having identified them?

    Also, is the FTP area where the new files will be a network drive that you can access through \\servername\sharename\... from your server? 

    J

     

  • The FTP area is on a different server which I have a password for, not under my control in any way, so to answer your question; no. I think that I now have a solution to actually downloading the new files once identified using the DTSFTPTask object. I'm not entirely sure how to go about identifying them though.

  • Can you delete the remote files when you have processed them?  If you can then any files appearing there will be new.

    J

  • Unfortunately not; I'm implementing something into an already existing system. I suppose in theory (as the files suffixes are sequential) it would be possible to iterate from the last file in the local folder and attempt to download until one isn't found, but that isn't the prettiest way of doing it...

  • The only idea I have is for you to create an FTP batch file to logon onto the FTP site, retrieve a directory listing and download this to a local file.  Then you can read this listing and compare the list of files with the list of already downloaded files.

    It's a long time since I did any FTP work and I might be wrong.

     

    J

Viewing 8 posts - 1 through 8 (of 8 total)

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