dbTalk Databases Forums  

How can I achieve the foll in dts

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


Discuss How can I achieve the foll in dts in the microsoft.public.sqlserver.dts forum.



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

Default How can I achieve the foll in dts - 06-06-2006 , 03:43 PM






Hi,
I need to download a file from an ftp server via my dts package. The order is

connect to ftp server
check if file exists (the name is always the same)
if yes, down load file and delete copy on ftp server
rename file from test to test.txt
parse file (This I got working)

I need help with the ftp part.

Thanks

Reply With Quote
  #2  
Old   
rb
 
Posts: n/a

Default RE: How can I achieve the foll in dts - 06-07-2006 , 04:00 AM






Hi Chris,

Quote:
connect to ftp server
check if file exists (the name is always the same)
Within DTS there is a FTP task where you can select a source, destination,
login information, etc. If the file does not exists this task will fail, so
automatically stopping the rest of your DTS package.

Quote:
rename file from test to test.txt
Once the FTP task has completed successfully you could have use an ActiveX
task to rename the file using the FileSystemObject model or write a batch/cmd
file to do the renaming and execute it with a Execute Process Task.

"Chris" wrote:

Quote:
Hi,
I need to download a file from an ftp server via my dts package. The order is

connect to ftp server
check if file exists (the name is always the same)
if yes, down load file and delete copy on ftp server
rename file from test to test.txt
parse file (This I got working)

I need help with the ftp part.

Thanks

Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default RE: How can I achieve the foll in dts - 06-07-2006 , 04:31 AM



Hello rb,

The package does not automatically have to fail. You could handle the "No
File" through the "On Failure" precedence constraint. You could also set
up the package to allow n errors before failing.

To rename the file I would be tempted to use the File System task from the
toolbox.


allan

Quote:
Hi Chris,

connect to ftp server
check if file exists (the name is always the same)
Within DTS there is a FTP task where you can select a source,
destination, login information, etc. If the file does not exists this
task will fail, so automatically stopping the rest of your DTS
package.

rename file from test to test.txt

Once the FTP task has completed successfully you could have use an
ActiveX task to rename the file using the FileSystemObject model or
write a batch/cmd file to do the renaming and execute it with a
Execute Process Task.

"Chris" wrote:

Hi,
I need to download a file from an ftp server via my dts package. The
order is
connect to ftp server
check if file exists (the name is always the same)
if yes, down load file and delete copy on ftp server
rename file from test to test.txt
parse file (This I got working)
I need help with the ftp part.

Thanks




Reply With Quote
  #4  
Old   
rb
 
Posts: n/a

Default RE: How can I achieve the foll in dts - 06-07-2006 , 05:11 AM



Hi Alan,

You are perfectly correct, both the success and failure can be handled.

Ray

"Allan Mitchell" wrote:

Quote:
Hello rb,

The package does not automatically have to fail. You could handle the "No
File" through the "On Failure" precedence constraint. You could also set
up the package to allow n errors before failing.

To rename the file I would be tempted to use the File System task from the
toolbox.


allan

Hi Chris,

connect to ftp server
check if file exists (the name is always the same)
Within DTS there is a FTP task where you can select a source,
destination, login information, etc. If the file does not exists this
task will fail, so automatically stopping the rest of your DTS
package.

rename file from test to test.txt

Once the FTP task has completed successfully you could have use an
ActiveX task to rename the file using the FileSystemObject model or
write a batch/cmd file to do the renaming and execute it with a
Execute Process Task.

"Chris" wrote:

Hi,
I need to download a file from an ftp server via my dts package. The
order is
connect to ftp server
check if file exists (the name is always the same)
if yes, down load file and delete copy on ftp server
rename file from test to test.txt
parse file (This I got working)
I need help with the ftp part.

Thanks





Reply With Quote
  #5  
Old   
Chris
 
Posts: n/a

Default RE: How can I achieve the foll in dts - 06-07-2006 , 11:21 AM



Hey, Thanks lads. Will work on this right away. This is good.

"Chris" wrote:

Quote:
Hi,
I need to download a file from an ftp server via my dts package. The order is

connect to ftp server
check if file exists (the name is always the same)
if yes, down load file and delete copy on ftp server
rename file from test to test.txt
parse file (This I got working)

I need help with the ftp part.

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.