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.
 
Well I can't see how you can get that without using API to capture the file name in the dialog box - it isn't in the HTML.
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,214,624
Messages
6,120,591
Members
448,973
Latest member
ksonnia

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