Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table to FTP-site..?

Status
Not open for further replies.

kenjoswe

Technical User
Sep 19, 2000
327
SE
Hi all,

I need to export data from a table or texfile to a FTP-site.
How can I do this with DTS?

I have seen a FTP-object when I designed other packages but that one seems to import data from a FTP location.

/Kent J.
 
Since my filenames change, I use ActiveX to write the FTP script file. Here's a code snippet:
Code:
'------ Set up FTP script file
	IF oFSO.FileExists("C:\FTP.ftp") THEN
		oFSO.DeleteFile ("C:\FTP.ftp")
	END IF

	SET oTextFile = oFSO.CreateTextFile("C:\FTP.ftp", True)

	oTextFile.WriteLine("login")
	oTextFile.WriteLine("password")
	oTextFile.WriteLine("lcd C:\")  '-- Change local dir
	oTextFile.WriteLine("cd /subdir")  '-- Change remote dir
	oTextFile.WriteLine("put " + Trim(DTSGlobalVariables("File1").Value))
	oTextFile.WriteLine("put " + Trim(DTSGlobalVariables("File2").Value))
	oTextFile.WriteLine( "quit")
	oTextFile.Close

Then I use Execute Process Task to call FTP with the following parameter string: -s:C:\FTP.ftp IP.IP.IP.IP

Good luck!

--John [rainbow]
-----------------------------------
Behold! As a wild ass in the desert
go forth I to do my work.
--Gurnie Hallock (Dune)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top