Results 1 to 8 of 8

Thread: How to get filedate and filesize ?

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Location
    Italy
    Posts
    12

    Angry How to get filedate and filesize ?

    I need to read date and size of a file before I download it. Normally I use INET for downloading, but I need to read file informations only before for verify of a new file version. Is possible to do it?
    Thanks in advance.
    Raoul

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    I believe you need to use the HTTP HEAD command. I don't know if the Inet control supports it though.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3
    CMangano
    Guest

  4. #4
    Hyperactive Member
    Join Date
    Apr 2001
    Posts
    315
    FSO can't get the file size from a file on a Web Server.

  5. #5
    CMangano
    Guest
    What do you mean? If the code you are writing is on the same server as the file you are downloading, you can certainly get the size. I don't think yo can get it remotely using FSO, if that is what you mean.

  6. #6
    Hyperactive Member
    Join Date
    Apr 2001
    Posts
    315
    If it was on the same machine there would be no need to "download" using INET.

  7. #7

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Location
    Italy
    Posts
    12
    Thanks JoshT, but I don't know HTTP HEAD command. Can you send me an example about it ?
    Thanks.

  8. #8
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    HEAD /page.html HTTP/1.0
    then two newlines.

    It works almost exactly the same as HTTP GET, except the server only sends the HTTP headers, it doesn't send the content with them.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width