Re: Download all files in directory (General questions)

by Patrick Flynn, (7451 days ago) @ Jasmine

In the connect event I have the following code

Private Sub Ftp1_Connected(ByVal ErrorCode As Long, ByVal ErrorText As String)
If ErrorCode = 0 Then
Ftp1.GetFiles C:Download , cdrbatches , 1
Else
Debug.Print CONNECT ERROR: & ErrorText
End If
End Sub

This code copies 1 of the 2 files in the cdrbatches subdirectory
but the file size is zero.

If how ever I try to copy from the root directory by using

Private Sub Ftp1_Connected(ByVal ErrorCode As Long, ByVal ErrorText As String)
If ErrorCode = 0 Then
Ftp1.GetFiles C:Download , , 1
Else
Debug.Print CONNECT ERROR: & ErrorText
End If
End Sub

the 1 file availiable is copied successfully

locked

Complete thread: