Discussion:
File name for Ftp task for SSIS
(too old to reply)
qjlee
2009-05-04 03:34:02 UTC
Permalink
I am using SQL 2005, and need to set up a SSIS ftp task to transfer files
from remote ftp server. Everyday, and a file is posted in a folder in that
remote ftp server, and the files are cleaned up weekly. The file name is in
AMMDD.txt format, in which MMDD is the month and day the file is posted.

How I can configure the ftp task?

Thanks,
Todd C
2009-05-05 11:31:01 UTC
Permalink
You could use an Expression on the FileName property of the ftp task (not
sure what properties are available because I don't use ftp all that often) to
dynamically change the file name based on the current date at run-time.

Or use a Script Task to set the contents of a variable as needed, then use
that variable as the source file name in the ftp operation.

HTH
=====
Todd C
Post by qjlee
I am using SQL 2005, and need to set up a SSIS ftp task to transfer files
from remote ftp server. Everyday, and a file is posted in a folder in that
remote ftp server, and the files are cleaned up weekly. The file name is in
AMMDD.txt format, in which MMDD is the month and day the file is posted.
How I can configure the ftp task?
Thanks,
qjlee
2009-05-05 13:49:01 UTC
Permalink
Can you be more specific?

Thanks,

QJLEE
Post by Todd C
You could use an Expression on the FileName property of the ftp task (not
sure what properties are available because I don't use ftp all that often) to
dynamically change the file name based on the current date at run-time.
Or use a Script Task to set the contents of a variable as needed, then use
that variable as the source file name in the ftp operation.
HTH
=====
Todd C
Post by qjlee
I am using SQL 2005, and need to set up a SSIS ftp task to transfer files
from remote ftp server. Everyday, and a file is posted in a folder in that
remote ftp server, and the files are cleaned up weekly. The file name is in
AMMDD.txt format, in which MMDD is the month and day the file is posted.
How I can configure the ftp task?
Thanks,
Todd C
2009-05-05 18:55:01 UTC
Permalink
OK: Looking at an FTP Task in SSIS, you can manually set the "LocalPath" and
"RemotePath" properties on the File Transfer page of the GUI Dialog box. Set
everything up, including other properties on this page so that it works.

Now, click on the Expressions page on the left, then click the elipsis (...)
next to Expressions on the right. Under Property, select RemotePath, then
click the elipsis again under Expression to open the Expression editor. In
the Expression Builder, you have access to Variables and functins, and can
also include literals.

Start with a simple expression such as:
"\\\\<My Server>\\<Share Name>\\FileName.ext" and click the Evaluate
Expression button. NOTE that since the \ characher is reserved, it must be
'escaped' or doubled in literals to be evaluated properly.

Manipulate the Expression in the builder such that it evaluates to a new
file name based on the date. You will probably need to add the MONTH( ) and
DAY( ) functions, converting them to string to be concatenated to a literal.


HTH
=====
Todd C
Post by qjlee
Can you be more specific?
Thanks,
QJLEE
Post by Todd C
You could use an Expression on the FileName property of the ftp task (not
sure what properties are available because I don't use ftp all that often) to
dynamically change the file name based on the current date at run-time.
Or use a Script Task to set the contents of a variable as needed, then use
that variable as the source file name in the ftp operation.
HTH
=====
Todd C
Post by qjlee
I am using SQL 2005, and need to set up a SSIS ftp task to transfer files
from remote ftp server. Everyday, and a file is posted in a folder in that
remote ftp server, and the files are cleaned up weekly. The file name is in
AMMDD.txt format, in which MMDD is the month and day the file is posted.
How I can configure the ftp task?
Thanks,
Loading...