SSIS FTP - How to check if directory exists

  • Hello,

    I have an SSIS FTP script that checks a table for an FTP directory to look for files in.

    I am looking to create a check to confirm that the actual file directory exists before my SSIS package tries to pull or send files. If it does not, I would like to create an error message.

    Is the best way to do this by creating a Script Task? Can anyone provide a good sample?

  • As far as I know there is no native command in FTP to check if a directory exists. What you will need to do is get a directory listing for the parent and then check the results for the directory name you need to do the existence check for.

    MSDN has a basic C# example you could easily port into an SSIS Script Task:

    https://msdn.microsoft.com/en-us/library/ms229716(v=vs.110).aspx

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

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

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