3.9. Using the File System and FTP Task

You should pause again and try out a few of the tasks. In this example, you're going to try to FTP a file from a university and then copy the file to an archive folder. Create a new directory if it doesn't exist yet called C:\SSISDemos\Archive. Then, create a new package in your Chapter3 SSIS project. Change the name of the package to FileCopy.dtsx.

Drag over the FTP task from the Toolbox to the design pane. Double-click on FTP task to open the editor, as shown in Figure 3-11. Name the task "FTP a File" and type any description. For the FTPConnection drop-down box, select <New connection...>. This will open the FTP Connection Editor. For the Server Name option, type ftp.microsoft.com and click Test Connection. Click OK to go back to the FTP Task Editor.

Next, go to the File Transfer page and type /bussys/readme.txt for the remote path. You can also click the ellipsis button to point to the file. For the Local Path option, select <New connection...> to open the File Connection Manager Editor. Select Existing Folder for the Usage Type and type C:\SSISDemos for the Folder.

The Operation drop-down box should be set to Receive Files. For the OverwriteFileAtDest option, select True. Click OK to exit the editor (shown in Figure 3-12).

Figure 3.11. Figure 3-11
Figure 3.12. Figure 3-12

Now that the file will be downloaded, go ahead and archive ...

Get Professional SQL Server™ 2005 Integration Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.