Home All Groups Group Topic Archive Search About

Sql Server 2005 FTP Task

Author
11 Feb 2006 2:56 PM
timdennis30
How do you loop through files on a remote server using the FTP Task?
The ForEarch Loop won't work because the files are stored on an FTP
server which needs a ftp connection string.  The ftp task looks like it

only works for one file at a time. The file names are not known before
the package runs, so I just need to loop through all files and transfer

each one.

Thanks

Author
11 Feb 2006 3:21 PM
John Bell
Hi

From Books online
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/extran9/html/41c3f2c4-ee04-460a-9822-bb9ae4036c2e.htm:

"This means that the FTP task can receive multiple files and delete multiple
remote files; but the task can send only one file and delete only one local
file if it uses a connection manager, because a File connection manager can
access only one file. To access multiple local files, the FTP task must use
a variable to provide the path information. For example, a variable that
contains "C:\Test\*.txt" provides a path that supports deleting or sending
all the files that have a .txt extension in the Test directory.

The FTP task supports the ? and * wildcard characters in paths. This lets
the task access multiple files. However, you can use wildcard characters
only in the part of the path that specifies the file name. For example,
C:\MyDirectory\*.txt is a valid path, but C:\*\MyText.txt is not. "

John

<timdenni***@gmail.com> wrote in message
Show quote
news:1139669769.734661.165310@o13g2000cwo.googlegroups.com...
> How do you loop through files on a remote server using the FTP Task?
> The ForEarch Loop won't work because the files are stored on an FTP
> server which needs a ftp connection string.  The ftp task looks like it
>
> only works for one file at a time. The file names are not known before
> the package runs, so I just need to loop through all files and transfer
>
> each one.
>
> Thanks
>

AddThis Social Bookmark Button