Filetime from FTP

This is a discussion on Filetime from FTP within the Windows Programming forums, part of the Platform Specific Boards category; I'm trying to achieve the filetime from a file on an FTP. To do this, I'm using FtpFindFirstFile()/InternetFindNextFile(). The reason ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    329

    Filetime from FTP

    I'm trying to achieve the filetime from a file on an FTP.
    To do this, I'm using FtpFindFirstFile()/InternetFindNextFile().

    The reason why i'm doing this, is because i have to compare the creation time/last write time of files on the local HD to the files on the FTP.

    The problem is that the filetime structs aren't filled outfrom the FTP.
    Is there any other means for achieving the filetime from the FTP?

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Under winsock, FTP's list will send a list of files in a specific path including the creation dates.

    Kuphryn

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    329
    So what you're saying, is that i have to connect not using the wininet functions, but implement the FTP protocol?
    Isn't there an easier way?
    I can only access the lastwritetime from the FTP..

  4. #4
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Are you sure the desired information is returned from the server?
    Quote Originally Posted by MSDN
    Because the FTP protocol provides no standard means of enumerating, some of the common information about files, such as file creation date and time, is not always available or correct. When this happens, FtpFindFirstFile and InternetFindNextFile fill in unavailable information with a best guess based on available information. For example, creation and last access dates are often the same as the file's modification date.
    Before you start writing complicated code, I would check with another FTP program whether this information is actually being returned by the server.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to program in unix
    By Cpro in forum Linux Programming
    Replies: 21
    Last Post: 02-12-2008, 09:54 AM
  2. FTP and Ident Server :: Winsock
    By kuphryn in forum Networking/Device Communication
    Replies: 2
    Last Post: 03-13-2004, 07:16 PM
  3. [C++] FTP client problem (winsock)
    By Niekie in forum Networking/Device Communication
    Replies: 2
    Last Post: 10-19-2003, 09:23 AM
  4. Writing FILETIME or SYSTEMTIME to File?
    By Tojam in forum Windows Programming
    Replies: 2
    Last Post: 09-23-2003, 01:55 AM
  5. FTP Server :: Winsock
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 10-03-2002, 07:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21