FTP File

  • I have created a very cool DTS package that takes a imported text files, consolidates the files, imports them into a staging area, inserts or modifies the individaul requests into production, creates a confirmation file, which then uses the name of the confirmation file to update the staging area so we have a ready reference.

    What I cannot figure out is how to get the original files down from the FTP site, and upload the confirmation file back up to the FTP site. Complicating the first one is that the files are never removed, so I essentially have to have a program that compares the files out on the customer FTP site to our processed folder.

    I currently have a C# module doing the first one, and an old VB program doing the second one. For maintenance reasons (we've lost both of the programmers who did this), I'd like to convert these to VBScript or use the FTP icon that comes with DTS (I'm using 2000) if possible. I have a feeling the second is easy, but the first may not be.

    I have checked for some FTP code, but can't find much helpful. Does anyone have some samples or point me to some samples?

    Thanks,

  • You cannot use the built-in FTP Task to send files back to the FTP site. It only works to receive files via FTP.

  • I did know that. What I'm looking for is some code, preferable VBScript, to FTP the file out. I've seen one sample, but it's not particularly clear, using a Shell.Open command.

  • If the FTP Server is within your domain you should be able to use the File System Object to retrieve and delete your files as well as post you new file.

    If that's not the case there is a posting on SQLDTS.com for using a com object for FTP purposes. Do a search on FTP.

    Matt,

    Peace Out!

    Regards,
    Matt

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

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