1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Dim ftpReq As System.Net.FtpWebRequest = Nothing
Dim ftpRes As System.Net.FtpWebResponse = Nothing
Try
MsgBox(dir_name)
ftpReq = CType(System.Net.WebRequest.Create(dir_name), System.Net.FtpWebRequest)
ftpReq.Credentials = New System.Net.NetworkCredential(user,pass)
ftpReq.Method = System.Net.WebRequestMethods.Ftp.MakeDirectory
ftpReq.KeepAlive = False
ftpRes = CType(ftpReq.GetResponse(), System.Net.FtpWebResponse)
ftpRes.Close()
Catch ex As Exception
MsgBox(ex.ToString)
End Try |