[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Automated Get and save

Posted on 2013-02-01
5
Medium Priority
?
350 Views
Last Modified: 2013-02-01
I need to download the .csv file from this link every 20 minutes:
http://aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=csv&stationString=KFWA&hoursBeforeNow=1

It tries to name itself "httpparam" and I change that to weather.txt

I use the data in various ways.

Rather than going to the site and clicking "save" each hour, is there a way to automatically poll and downlod the file without input?

I cannot use any other software than I have, but CAN run VBScripts!
0
Comment
Question by:TIgerV
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 22

Expert Comment

by:plusone3055
ID: 38844520
instructions are on this link for hte script
http://orangescripts.blogspot.com/2007/09/vbscript-to-retrieve-file-from-url-and.html

Then put the script in windows sheduled tasks to run every 20 min
BOOM your done :)
0
 

Author Comment

by:TIgerV
ID: 38844663
Activex can't create object: 'MSXML2.SERVERObj1'

Any ideas how I can get beyond that?  It's coming from line 4
0
 
LVL 22

Accepted Solution

by:
plusone3055 earned 2000 total points
ID: 38844710
use this name the file 123.vbs

dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
dim bStrm: Set bStrm = createobject("Adodb.Stream")
xHttp.Open "GET", "http://aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=csv&stationString=KFWA&hoursBeforeNow=1", False
xHttp.Send

with bStrm
    .type = 1 '//binary
    .open
    .write xHttp.responseBody
    .savetofile "C:\TEST\123.txt", 2 '//overwrite
end with
0
 

Author Closing Comment

by:TIgerV
ID: 38844734
PERFECT!  Much appreciated.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question