The directory is not the problem. The error only occurs when it tires to access the folder. I have also been reading a few posts and found that If it change the code to the one below, it will download the file but still will not put it in the folder that I specify. If only puts it on the root of the C:.
Public Class Form1
Private Sub Connect_MC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Connect_MC.Click
FtpConnection1.ServerAddress = (Server_Info.Text)
FtpConnection1.UserName = (MC_UN_1.Text)
FtpConnection1.Password = (MC_P_1.Text)
FtpConnection1.Connect()
FtpConnection1.ChangeWorkingDirectory("/var/tmp")
FtpConnection1.ChangeWorkingDirectory("/var/tmp")
Dim file_1 As String = "serverinfo" & ".txt"
FtpConnection1.DownloadFile("C:\logs" + file_1, file_1)
FtpConnection1.Close()
End Sub
Does any one know how to correct this or what I am doing wrong?