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

sql server dts

group:

Download file via HTTP


Download file via HTTP Sergey Karimov
10/7/2004 12:03:01 AM
sql server dts:
There is a simple task:
Download file via predefined HTTP URL and save it to predefined location on
disk.
What is the simplest and fastest way to do this?

By the way why there is an option to download file with standard component -
"File Transfer Protocol Task" and there is no standard component to download
Re: Download file via HTTP Melih SARICA
10/7/2004 3:19:32 PM
here is a script for u ..

dim mInternet
dim mFile
dim mFiletxt

Set mInternet= CreateObject("Microsoft.XMLHTTP" )
mInternet.open "GET" , "http://www.microsoft.com", false
mInternet.send
mFiletxt= mInternet.Responsetext
set mInternet = nothing

set mFileObj = createObject("scripting.FilesystemObject")
set mfile = mfileObj.createtextfile("c:\myfile.csv")
mfile.write mfiletxt
mfile.close
set mfile = nothing
set mfileobj = nothing



this script ll download the desired page into myfilecvs.. U can use it in
every DTS




[quoted text, click to view]

AddThis Social Bookmark Button