VB question

Discussion in 'OT Technology' started by Yep, Sep 23, 2003.

  1. Yep

    Yep Knick knack paddy whack, give the old dog a bone

    Joined:
    Jan 22, 2001
    Messages:
    4,603
    Likes Received:
    0
    Location:
    South Jersey
    Is there a way to obtain the creation date or modified date for a file on an HTTP sever? I'm sure there is since, directory listings will show the date in explorer.
     
  2. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    You will have to create an HTTP connection and create a request to the target file. Then just read back the response header (the key here is ONLY the response header). Doesn't make any sense to download a 4mb file when all you need is 1 line of text.

    Here's the header you want:
    Last-Modified: Wed, 09 Apr 2003 05:06:58 GMT

    The last-modified will show when the file was last played with. The date/time you see there is for the OT logo seen in the upper left corner of your browser.

    Yes, this can be done with VB. I built an app that looked at image files and from the modified date, I could determine if I needed to download the image again or not (the app kept an image cache to save us bandwidth). I have code, but the app was built at work and I can't release it.
     
  3. Yep

    Yep Knick knack paddy whack, give the old dog a bone

    Joined:
    Jan 22, 2001
    Messages:
    4,603
    Likes Received:
    0
    Location:
    South Jersey
    Any chance you can point me in the right direction... to a website or something?



    edit: n/m I seem to have figured it out.

    Thanks
     

Share This Page