dbTalk Databases Forums  

Download file via HTTP

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


Discuss Download file via HTTP in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sergey Karimov
 
Posts: n/a

Default Download file via HTTP - 10-07-2004 , 02:03 AM






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
file via HTTP?

Reply With Quote
  #2  
Old   
Melih SARICA
 
Posts: n/a

Default Re: Download file via HTTP - 10-07-2004 , 07:19 AM






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




"Sergey Karimov" <SergeyKarimov (AT) discussions (DOT) microsoft.com> wrote

Quote:
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
file via HTTP?



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.