Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 DTS FTP Task

Author  Topic 

Scott
Posting Yak Master

145 Posts

Posted - 2003-08-14 : 07:26:51
When I create an FTP tak in my package it only lists the files in the default ftp directory on the server I login to. How can I specify a different directory?

Thanks
Scott

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-08-14 : 11:35:29
Well, you can't. You would have to change the default directory on the login on the FTP server. The FTP task in DTS is very limiting so that's why most people write a batch file that does the FTP commands instead of using the FTP task.

Here's a sample FTP batch file:

@echo off

ftp -s:F:\SomeDirectory\SomeFile.txt >F:\SomeDirectory\Output\SomeFile.log


And here is SomeFile.txt, which is called by the above file:

open SomeServer.SomeDomain.com
SomeLogin
SomePswd
lcd F:\SomeLocalDirectory
cd SomeDirectoryOnFTPServer/AnotherDirectory
binary
prompt
mget *
bye




Tara
Go to Top of Page
   

- Advertisement -