dbTalk Databases Forums  

FTP DTS Process not overwritting file

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


Discuss FTP DTS Process not overwritting file in the microsoft.public.sqlserver.dts forum.



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

Default FTP DTS Process not overwritting file - 12-05-2004 , 06:16 PM






I have a DTS procedure that calls this code via stored
procedure. Then I import the file into sql server.
Problem is that it is not overwriting the file in my
c:\localdirectory. Is there an attribute I should set
in my text file or is should I delete the file in the
directory before ftp'in the other file. If so how do you
delete a file using DTS?

--- text file ----
open www.mywebsite.com
myusername
mypassword
CD html/Uploads
binary
lcd C:\localdirectory
get mytextfile.txt
bye

Reply With Quote
  #2  
Old   
Nigel Rivett
 
Posts: n/a

Default RE: FTP DTS Process not overwritting file - 12-05-2004 , 08:35 PM






Why not delete the file from the sp usuing xp_cmdshell.
You can also set ftp not to prompt.

I tend to do all ftp from SPs - creating the text file to run
see
http://www.nigelrivett.net/s_ftp_PutFile.html

"James Johnson" wrote:

Quote:
I have a DTS procedure that calls this code via stored
procedure. Then I import the file into sql server.
Problem is that it is not overwriting the file in my
c:\localdirectory. Is there an attribute I should set
in my text file or is should I delete the file in the
directory before ftp'in the other file. If so how do you
delete a file using DTS?

--- text file ----
open www.mywebsite.com
myusername
mypassword
CD html/Uploads
binary
lcd C:\localdirectory
get mytextfile.txt
bye


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.