Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Download files from website


From   "Rodrigo Martell" <[email protected]>
To   <[email protected]>
Subject   st: Download files from website
Date   Tue, 16 Jan 2007 11:18:18 +1100

Apologies if this is a repeat, the first one doesn't seem to have gone through.

Hi all,
 
I'm trying to write code to download a bunch of files from a website to disk. I am encountering two problems, however:
 
1. The files have a specific URL (e.g. http://www.nemweb.com.au/REPORTS/ARCHIVE/DispatchIS_Reports/PUBLIC_DISPATCHIS_20051217.ZIP)
2. The files are .zip files that have csvs within them.
    
 
I'm not sure how to tell Stata to download the files to disk and then to unzip them since -webuse- tries to load the file straight into Stata so I don't think that will work. The URLS differ only in the date ("20051217"), for which I can write code no problem, it's just the downloading part that has me stuck.
I suspect I might have to use -shell- to break into Windows' command prompt but I can't find any commands to issue to download the zip files (I remember seeing some commands to unzip stuff, so the first step is the crucial one).
 
Has anyone come across this problem and/or solution before? I'd appreciate any help.
 
Many thanks,
 
Rodrigo

Rodrigo Martell

 <http://www.frontier-economics.com> 	
Frontier Economics Pty. Ltd.
395 Collins Street
Melbourne VIC 3000
Australia
www.frontier-economics.com 	
switch:
direct:
fax:
mobile:
email:


+61 (0)3 9620 4488
+61 (0)3 9613 1518
+61 (0)3 8614 2711
+61 (0)407 909 811
[email protected] <mailto:[email protected]> 


This e-mail, including any attachments, may contain confidential and privileged information for the sole use of the intended recipient(s). Any review, use, disclosure or distribution by others is strictly prohibited. If you are not the intended recipient (or authorised to receive information for the recipient), please contact the sender by reply e-mail and delete all copies of this message. Thank you.


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index