Download File from sub address in the URL using API functions

Raj_123

New Member
Joined
Jun 13, 2008
Messages
2
Hi Team,

I am a fresher & new to this group.

Using API function ,I wrote a Macro code to download the file from Internet. This works when I have complete value of the URL. But I want to download the file without entering full value of the URL.

In detail:-.

Each and every day, new files will be updated in my(x.com) website. For example, the URL of the website is www.me.com

URL of the file to Download is http://www.me.com/13jun2008_1200.txt

The standard format of the file name is " DDMONYYYY_HHMM.txt".
http://www.me.com/13jun2008_1200.txt
Here the problem is ,I know the date part (DDMONYYYY) of the file name but I do not know the exact time(HHMM) value part of the file name.

But I am sure the , only one file will be updated for each day with varying time.
I have to write a code to download the file each day automatically.

Please advise , as like directory file path I cannot specify (*)http://www.me.com/13jun2008_*.txt - This is NOT working.

In VB macro how to find out the valid remaing value of the URL?

Can anybody help me on this. Thanks in advance.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Can you tell me how you did it? I have various URLS that do not end with the file name like this one...
<table width="64" border="0" cellpadding="0" cellspacing="0"><colgroup><col width="64"></colgroup><tbody><tr height="20"> <td style="height:15.0pt;width:48pt" width="64" height="20">http://shop.mobileation.com/core/media/media.nl?id=31252&c=ACCT124922&h=9faa6364a65dff6afb00</td> </tr></tbody></table>
I have a whole column of 3000 URLS and I need to replace the URL with the jpg file located at the URL. when you go to the URL you just see 1 image file. I need the name for each one. Any ideas on if that is possible?

thanks
 
Upvote 0
Is there a page with link for each image, a kind of index if you like?
 
Upvote 0
Yes, I think. I am not very experienced with dev stuff. I just use Excel a lot for imports and exports. I am basically trying to import our 3600 products into a new website but the host I am leaving can not provide me the image file names that I need for my csv file. Therefore I am stuck with only URL's that likn to the files that I need the names of. I need to keep them within the excel sheet so they all line up for import.
the url's are all in a column, each url in an individual cell and look like this:
<table width="139" border="0" cellpadding="0" cellspacing="0"><colgroup><col style="mso-width-source:userset;mso-width-alt:5083;width:104pt" width="139"> </colgroup><tbody><tr style="height:15.0pt" height="20"> <td style="height:15.0pt;width:104pt" width="139" height="20">http://shop.mobileation.com/core/media/media.nl?id=6437&c=ACCT124922&h=14511f822e8298b387db</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">http://shop.mobileation.com/core/media/media.nl?id=11030&c=ACCT124922&h=f8e117fdfb90c3175f34</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">http://shop.mobileation.com/core/media/media.nl?id=11028&c=ACCT124922&h=d22e15b39383e428d8d8</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">http://shop.mobileation.com/core/media/media.nl?id=31252&c=ACCT124922&h=9faa6364a65dff6afb00</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">http://shop.mobileation.com/core/media/media.nl?id=14310&c=ACCT124922&h=a61862fdd1b8a7e410b5</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">http://shop.mobileation.com/core/media/media.nl?id=31250&c=ACCT124922&h=d281fec54dbafca24aa2</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">http://shop.mobileation.com/core/media/media.nl?id=31256&c=ACCT124922&h=ba231f531565ca11d3f7</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">http://shop.mobileation.com/core/media/media.nl?id=11631&c=ACCT124922&h=3ddf4360342bce4af2c3</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">http://shop.mobileation.com/core/media/media.nl?id=400&c=ACCT124922&h=9c609db53607f629a47d</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">http://shop.mobileation.com/core/media/media.nl?id=3760&c=ACCT124922&h=5b70306a6b2e1b5cf424</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">http://shop.mobileation.com/core/media/media.nl?id=4462&c=ACCT124922&h=2575d4fc8b99617c9b8f</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">http://shop.mobileation.com/core/media/media.nl?id=6441&c=ACCT124922&h=2f07338418ef9a0d3840</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">http://shop.mobileation.com/core/media/media.nl?id=11627&c=ACCT124922&h=1b03e4cc3cc5b477cd23</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">http://shop.mobileation.com/core/media/media.nl?id=11629&c=ACCT124922&h=1dead2f9d5ad2e579802</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">http://shop.mobileation.com/core/media/media.nl?id=5582&c=ACCT124922&h=82a461abad999fe05a81</td> </tr> </tbody></table>
each one links to a different image. I have the images all downloaded but I don't know what file name belongs to what link so I wanted to download the file names from the URLS. The files are all ".jpg" or ".gif" type image files

THANK you so much for trying to help me.
 
Upvote 0
There aren't any filenames to download, those URLs just appear to lead to a page with the image.

The only HTML in that page is an image whose source is the URL.
 
Upvote 0
It isn't there.

Here's the complete HTML for the first URL.
HTML:
<HEAD>
****** content="text/html; charset=iso-8859-7" http-equiv=Content-Type></HEAD>
<BODY><IMG src="http://shop.mobileation.com/core/media/media.nl?id=6437&c=ACCT124922&h=14511f822e8298b387db"></BODY>
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,597
Members
449,038
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top