all groups > sql server dts > december 2004 >
You're in the

sql server dts

group:

FTP DTS Process not overwritting file



FTP DTS Process not overwritting file James Johnson
12/5/2004 4:16:25 PM
sql server dts: 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
RE: FTP DTS Process not overwritting file Nigel Rivett
12/5/2004 6:35:06 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

[quoted text, click to view]
AddThis Social Bookmark Button