不能一次性创建,必须一层一层的创建。
你可以写成循环,如代码
Dim paths = fpth.split("\")
Dim path As String = "\"
For i As Integer = 1 To paths.length-1 path &= "\" & paths(i) If ftp1.DirExists(path) = False Then '判断指定的目录不存在 ftp1.MakeDir(path) '在ftp上创建目录 End IfNext