PC Review


Reply
Thread Tools Rate Thread

Code for file download

 
 
Vivek
Guest
Posts: n/a
 
      12th Feb 2008
Hi,

Need some help automating a daily task of mine - downloading a zip file from a stock exchange site and saving it to disk.

Here are the steps involved:

Browse to http://www.bseindia.com/mktlive/bhavcopy.asp
Click on the link : "Download file in csv format (Zipped)" Alternatively, the file can be directly downloaded in which case the url would be http://www.bseindia.com/bhavcopy/eq<ddmmyy>_csv.zip Of course ddmmyy would be replaced by date chosen by me.
Save zip to folder C:\abcd

Would be grateful for suggestions.

Cheers...
Vivek
 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      13th Feb 2008
Sub test()

MyDate = Format(Date, "DDMMYY")
ZipFile = "eq" & MyDate & "_csv.zip"

Set fs = CreateObject("Scripting.FileSystemObject") '
fs.CopyFile "//www.bseindia.com/bhavcopy/" & ZipFile, "c:\abcd\"

End Sub

"Vivek" wrote:

> Hi,
>
> Need some help automating a daily task of mine - downloading a zip file from a stock exchange site and saving it to disk.
>
> Here are the steps involved:
>
> Browse to http://www.bseindia.com/mktlive/bhavcopy.asp
> Click on the link : "Download file in csv format (Zipped)" Alternatively, the file can be directly downloaded in which case the url would be http://www.bseindia.com/bhavcopy/eq<ddmmyy>_csv.zip Of course ddmmyy would be replaced by date chosen by me.
> Save zip to folder C:\abcd
>
> Would be grateful for suggestions.
>
> Cheers...
> Vivek
>

 
Reply With Quote
 
Vivek
Guest
Posts: n/a
 
      14th Feb 2008
Hi Joel,

Thanks for the code, works well for me

Vivek

"Joel" <(E-Mail Removed)> wrote in message news:9E6FBE2A-03F8-4B82-B27C-(E-Mail Removed)...
> Sub test()
>
> MyDate = Format(Date, "DDMMYY")
> ZipFile = "eq" & MyDate & "_csv.zip"
>
> Set fs = CreateObject("Scripting.FileSystemObject") '
> fs.CopyFile "//www.bseindia.com/bhavcopy/" & ZipFile, "c:\abcd\"
>
> End Sub
>
> "Vivek" wrote:
>
>> Hi,
>>
>> Need some help automating a daily task of mine - downloading a zip file from a stock exchange site and saving it to disk.
>>
>> Here are the steps involved:
>>
>> Browse to http://www.bseindia.com/mktlive/bhavcopy.asp
>> Click on the link : "Download file in csv format (Zipped)" Alternatively, the file can be directly downloaded in which case the url would be http://www.bseindia.com/bhavcopy/eq<ddmmyy>_csv.zip Of course ddmmyy would be replaced by date chosen by me.
>> Save zip to folder C:\abcd
>>
>> Would be grateful for suggestions.
>>
>> Cheers...
>> Vivek
>>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA code to download csv file from FTP site Sabosis Microsoft Access VBA Modules 6 19th May 2009 11:19 PM
VBA code to download csv file from FTP site Sabosis Microsoft Access VBA Modules 0 19th May 2009 04:58 PM
Error 76 in file download code Vivek Microsoft Excel Programming 3 23rd Feb 2008 12:52 AM
Code for file download Vivek Microsoft Excel Programming 0 12th Feb 2008 04:47 PM
problem with code download file - two window file download Sam -- Microsoft ASP .NET 2 17th Mar 2005 04:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:01 PM.