|
-
Oct 18th, 2010, 01:00 AM
#1
Thread Starter
Fanatic Member
[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.
-
Oct 18th, 2010, 01:04 AM
#2
Thread Starter
Fanatic Member
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:
Set MyFile = fsObj.GetFile("http://www.mywebsite.com/myfolder/myimage.jpg")
-
Oct 18th, 2010, 03:34 AM
#3
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
-
Oct 18th, 2010, 03:38 AM
#4
Thread Starter
Fanatic Member
Re: How to get Date Modified from a file on my server
Thanks Westconn1. I will try that tomorrow.
-
Oct 18th, 2010, 09:57 PM
#5
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.
-
Oct 20th, 2010, 02:57 AM
#6
Thread Starter
Fanatic Member
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...
-
Oct 20th, 2010, 06:09 PM
#7
Re: How to get Date Modified from a file on my server (RESOLVED)
Should save on possible time zone corrections then too.
-
Oct 22nd, 2010, 12:50 AM
#8
Thread Starter
Fanatic Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|