dbTalk Databases Forums  

File name for Ftp task for SSIS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss File name for Ftp task for SSIS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
qjlee
 
Posts: n/a

Default File name for Ftp task for SSIS - 05-03-2009 , 10:34 PM






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,



Reply With Quote
  #2  
Old   
Todd C
 
Posts: n/a

Default RE: File name for Ftp task for SSIS - 05-05-2009 , 06:31 AM






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


"qjlee" wrote:

Quote:
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,



Reply With Quote
  #3  
Old   
qjlee
 
Posts: n/a

Default RE: File name for Ftp task for SSIS - 05-05-2009 , 08:49 AM



Can you be more specific?

Thanks,

QJLEE

"Todd C" wrote:

Quote:
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


"qjlee" wrote:

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,



Reply With Quote
  #4  
Old   
Todd C
 
Posts: n/a

Default RE: File name for Ftp task for SSIS - 05-05-2009 , 01:55 PM



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


"qjlee" wrote:

Quote:
Can you be more specific?

Thanks,

QJLEE

"Todd C" wrote:

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


"qjlee" wrote:

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,



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.