Results 1 to 8 of 8

Thread: [RESOLVED] How to get Date Modified from a file on my server (RESOLVED)

  1. #1

    Thread Starter
    Fanatic Member Avatarp's Avatar
    Join Date
    Sep 2002
    Location
    Calgary
    Posts
    826

    Resolved [RESOLVED] How to get Date Modified from a file on my server (RESOLVED)

    I have files that are accessible via URL. Is there a simple way to retrieve the date modified property? I have to iterate through 100's if not a few thousand files during this process so I need a fairly speedy solution.

    Any ideas would be awesome!
    Last edited by Avatarp; Oct 20th, 2010 at 02:51 AM.

  2. #2

    Thread Starter
    Fanatic Member Avatarp's Avatar
    Join Date
    Sep 2002
    Location
    Calgary
    Posts
    826

    Re: How to get Date Modified from a file on my server

    I am trying to us the FileSystemObject and then the FileDateTime

    vb Code:
    1. Set MyFile = fsObj.GetFile("http://www.mywebsite.com/myfolder/myimage.jpg")

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: How to get Date Modified from a file on my server

    i don't believe there is any way to do this with the file system object

    you can try with inet control
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  4. #4

    Thread Starter
    Fanatic Member Avatarp's Avatar
    Join Date
    Sep 2002
    Location
    Calgary
    Posts
    826

    Re: How to get Date Modified from a file on my server

    Thanks Westconn1. I will try that tomorrow.

  5. #5
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: How to get Date Modified from a file on my server

    The FSO isn't going to do it.

    Unless the server sends a Last Modified header the INet control won't work either.

    Then you're limited to using either WebDAV or FTP to do an attributes request, assuming the server supports one of these.

  6. #6

    Thread Starter
    Fanatic Member Avatarp's Avatar
    Join Date
    Sep 2002
    Location
    Calgary
    Posts
    826

    Re: How to get Date Modified from a file on my server (RESOLVED)

    I just simply cheated...stored the values in my DB on upload...they may be a few seconds off from correct but good enough...

  7. #7
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: How to get Date Modified from a file on my server (RESOLVED)

    Should save on possible time zone corrections then too.

  8. #8

    Thread Starter
    Fanatic Member Avatarp's Avatar
    Join Date
    Sep 2002
    Location
    Calgary
    Posts
    826

    Re: How to get Date Modified from a file on my server (RESOLVED)

    Good point dilettante. The server always stores this value in Eastern Standard Time. I will have to look into how I will save this in the local DB.

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