|
-
Oct 14th, 2000, 02:11 PM
#1
Thread Starter
Member
Using the INet control for FTP . . .
Hello,
I am using the inet control to create FTP file synchronization software for my company. To do this I need to be able to find the date a file was last updated. How can I do this using the Microsoft INet control? Thanks . . .
[Edited by TheLeeMan on 10-14-2000 at 03:19 PM]
-
Oct 14th, 2000, 02:23 PM
#2
Try this:
Code:
Private Function GetLastMod(strURL As String) As String
Dim strHeader As String
'Cancel any current operations
Inet1.Cancel
'Set protocol to FTP
Inet1.Protocol = icFTP
'Open the URL
Inet1.OpenURL (strURL)
'Retrieve last modified date
strHeader = Inet1.GetHeader("Last-modified")
GetLastMod = strHeader
End Function
-
Oct 15th, 2000, 03:25 PM
#3
Thread Starter
Member
Thanks,
Is there a way to do this without knowing the URL, just the FTP location? Would inet1.document work as an alternate way to get the date using your code since I will be already connected via FTP? Will this code download the file to discover its last-modified header or will it just retrieve this single value.
Also - I seem to have a problem when i run
Inet1.Execute , "DIR"
on a server whose current directory contains no files. It just seems to lock up for the diration of the timeout value. Any ideas to the cause/solution? Thanks in advance . . .
[Edited by TheLeeMan on 10-15-2000 at 04:53 PM]
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
|