Jump to content

Recommended Posts

Posted

I know you can use InetGetSize ( "URL" ). But i was wondering if there is a way to return the date that the file was created/modified? If there is a way I have been unable to figure it out. I am trying to check some pdf/chm files to see if they have changed and am currently using the InetGetSize ( "URL" ) function for that. Checking the date would be a guarentee of whether the pdf/chm has changed. The files size difference wiil not be 100%, maybe 99.9% but not 100%.

Thanx for any help.

Posted

Based on the example from the COM reference part of the AutoIt manual...

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("GET","http://www.google.com/analytics/features.html")
$oHTTP.Send()
$HTTP_headers = $oHTTP.GetAllResponseHeaders

I got the GetAllResponseHeaders function form here (also quoted in the manual) ...

http://msdn.microsoft.com/library/default....httprequest.asp

Now the response headers are stored in "$HTTP_headers".

You can parse out the "Last-Modified:" part for your own evil ends.

-mu

Posted

Thanx that was what I was looking for, I now noticed that inetget doesnt keep the same date of the file. But it looks like i can use the httprequest to acomplish this as well.

Posted

Yes, it's very useful.

Note that dynamically generated pages always return "now" (or thereabouts) as the modified time, but for fixed documents, PDFs, regular HTML, etc, it's very reliable.

-mu

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...