Results 1 to 3 of 3

Thread: inet control

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 1999
    Location
    Richmond, Virginia
    Posts
    41

    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]
    TheLeeMan



  2. #2
    Guest
    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

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 1999
    Location
    Richmond, Virginia
    Posts
    41
    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]
    TheLeeMan



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