VBA How to Retrieve File Properties from web site files

levy8450

New Member
Joined
Nov 29, 2008
Messages
19
Within VBA, I can easily download a file and then obtain properties from that file using URLDownloadtofile to download a file and .getdetailsof to obtain file properties from the file on disk.
However, I want to avoid downloading the file if it does not meet certain criteria, so I want to find out the file properties before I download the file.

For instance, I've identified an image file with the hypothetical address of "http://www.samplesite.com/filename.jpg." I only want to download the entire file it if its bit depth exceeds a certain number, so I want to find that property before downloading.
Is there any way to do this? I don't need a code excerpt (though I wouldn't say no!), I just need to know the core command(s) to use.
Thanks for any help!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,214,788
Messages
6,121,582
Members
449,039
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