I’m attempting to use the GetCreateDtByName() method. I’ve already set the remote directory with ChangeRemoteDir(), and have confirmed the file exists, but the following call generates an error:
GetFileDateFTP = ftp.GetCreateDtByName(sFileName)(Error: Object doesn't support this property or method)
I’m using the ActiveX (Chilkat_9_5_0.Ftp2)
Is that not the correct syntax to obtain the file date/time?
It could be one of two things:
1) You are using an older version of the Chilkat ActiveX, and it is older than when the GetCreateDtByName method was first introduced. Updating to the latest version of Chilkat would fix the problem.
2) The ftp.GetCreateDtByName returns a CkDateTime object, as can be seen by the function signature in the online reference documentation at https://www.chilkatsoft.com/refdoc/xChilkatFtp2Ref.html:
GetCreateDtByName(filename As String) As CkDateTimeIn programming languages such as VB6, you need the "Set" keyword to assign variables to returned objects. For example:
Set GetFileDateFTP = ftp.GetCreateDtByName(sFileName)