I spent hours on this and after searching the forum I found figured out how to connect using the FtpClient so I could use the Dir I thought I had it figured out but still cant get it to work I commented the code so that you could see what I am trying to do.
Dim File As String
Dim myFTP As New EnterpriseDT.Net.Ftp.FTPClient
With myFTP
'Connect client To ftp server
.RemoteHost = "productfast.com"
.ConnectMode = EnterpriseDT.Net.Ftp.FTPConnectMode.PASV
.Connect()
.Login(txtUsername.Text, txtPassword.Text)
'Loop through the entire file and directories listing
For Each File In myFTP.Dir
'Check to see if file is a directory if so add it to the listbox
If File Is Dir(File) Then
ListBox1.Items.Add(File)
End If
Next
The listbox displays nothing and doent error out. I tried to use the dirDetails and it did list the folders but I couldnt get it to break down to the foldername alone. I am about to give it up. any suggestions. I think some of the confusion is in the dir() command because I originally thought that the array was only Directories but when I went through the array it had the whole Directory including files.