download zip file with XP and Internet Explorer
Moderators: Dorian (MJT support), JRL
-
- Newbie
- Posts: 4
- Joined: Tue Sep 23, 2008 3:04 pm
download zip file with XP and Internet Explorer
I have a script that downloads a ZIP file from here:
http://www.sws.uiuc.edu/warm/cdflist.asp?y=2008
I navigate to that address, click ALL STATIONS, and the File Download dialog appears.
Everything worked fine (or I changed something without realizing it) until the last Windows XP update. Now if I navigate to that link, it opens the ZIP file as a folder on my machine in C:\Documents and Settings\...\Temporary Internet Files\...
If I right click the ALL STATIONS link, I can manually choose "Save Target As", but I'm uncertain how to automate that.
Any ideas on how to force the file download dialog?
Thank you
Edit: It still works fine on my Vista machine.
http://www.sws.uiuc.edu/warm/cdflist.asp?y=2008
I navigate to that address, click ALL STATIONS, and the File Download dialog appears.
Everything worked fine (or I changed something without realizing it) until the last Windows XP update. Now if I navigate to that link, it opens the ZIP file as a folder on my machine in C:\Documents and Settings\...\Temporary Internet Files\...
If I right click the ALL STATIONS link, I can manually choose "Save Target As", but I'm uncertain how to automate that.
Any ideas on how to force the file download dialog?
Thank you
Edit: It still works fine on my Vista machine.
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
Why not do it the easy way? That ALL STATIONS link is to
http://www.sws.uiuc.edu/warm/data/cdfs/ ... ions08.zip
and you can use HTTPRequest> to grab it directly without having to open IE.
(My guess is that the 2009 file will be "09".)
http://www.sws.uiuc.edu/warm/data/cdfs/ ... ions08.zip
and you can use HTTPRequest> to grab it directly without having to open IE.
(My guess is that the 2009 file will be "09".)
-
- Newbie
- Posts: 4
- Joined: Tue Sep 23, 2008 3:04 pm
good idea
That's a nice workaround and it's simpler than what I started with. I appreciate the help.
Re: download zip file with XP and Internet Explorer
How can I use HTTPRequest> for downloading JPG files from internet and saving them with the same name? There is a lot of such files.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: download zip file with XP and Internet Explorer
In order to request the file you must already know it's name, so your script logic would use that same name for the local file.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: download zip file with XP and Internet Explorer
For example, I want to download the following link to a pic:
http://photos.vanityfair.com/2014/10/06 ... r-ss03.jpg
and save to a folder named c:\pics\Jennifer_Lawrence
What is the sentence using HTTPRequest?
Thanks
http://photos.vanityfair.com/2014/10/06 ... r-ss03.jpg
and save to a folder named c:\pics\Jennifer_Lawrence
What is the sentence using HTTPRequest?
Thanks
Re: download zip file with XP and Internet Explorer
Code: Select all
Let>FileName= c:\pics\Jennifer_Lawrence\J_L_0001.jpg
HTTPRequest>http://photos.vanityfair.com/2014/10/06/5432e75e74ed87dd423a3848_jennifer-lawrence-vanity-fair-11-november-cover-ss03.jpg,FileName,Get,,,
Re: download zip file with XP and Internet Explorer
I want the downloaded file to have the same name without put this name twice. What must I do?
Another question, do the macro pause until downloading is complete?
Another question, do the macro pause until downloading is complete?
Re: download zip file with XP and Internet Explorer
Ok... This works on this particular web page but will likely need to be amended for other web pages. I first downloaded the http://photos.vanityfair.com/2014/10/06 web page and examined the source to see how to parse out the jpg data. Then wrote the code to do that. If you want other web pages you'd need to do the same for each page. Also, be forewarned that web pages are generally changed on a regular basis so your code might work one time then fail the next time you try use it.
And yes the macro pauses at each line including the HttpRequest> line.
And yes the macro pauses at each line including the HttpRequest> line.
Code: Select all
HTTPRequest>http://photos.vanityfair.com/2014/10/06,,Get,,vHttp_Data,,
Separate>vHttp_Data,"name":",vLine
Message>
Let>kk=0
Repeat>kk
Add>kk,1
Let>Value=vLine_%kk%
Separate>Value,.jpg"%comma%",vImage
SetControlText>Macro Scheduler Message,TMemo,1,%kk% of %vLine_Count%%crlf%%vImage_1%.jpg
Let>FileName=c:\pics\Jennifer_Lawrence\%vImage_1%.jpg
HTTPRequest>http://photos.vanityfair.com/2014/10/06/%vImage_1%.jpg,FileName,Get,,,
Until>kk=vLine_Count
Re: download zip file with XP and Internet Explorer
Imagine there are many pics and some of them are "jpg", other ones are "gif", other ones are "png".
What can it be done?
Thanks
What can it be done?
Thanks