myflp 中存好了FTP上的文件夹地址,然后想分别将长文件名(带地址)和文件名(不包括地址)分别存入myfl和mmyfl,但结果两个都是长文件名,还存了两遍,什么情况?Bug么?
原始代码:
Dim fls,ffls,myflp,myfl,MMyfl As List(of String)
myfl = fls
myfl.Clear
MMyfl = fls
MMyfl.Clear
For i =0 To myflp.Count-1
fls.Clear
ffls.Clear
fls = ftp1.GetFileList(myflp(i))
ffls =fls
If fls.count < 1 Then
Continue For
End If
For j=0 To fls.Count - 1
ffls(j) = dl & "\" & fls(j)
Next
myfl.AddRange(ffls)
MMyfl.AddRange(fls)
Next
Tables("表A").AddNew(mmyfl.Count)
For i =0 To myfl.Count-1
Tables("表A").Rows(i)("第一列") = mmyfl(i)
Tables("表A").Rows(i)("文件地址") = myfl(i)
Next
MessageBox.Show( "共计文件:" & myfl.Count & "个,耗时: " & (Date.Now - st).TotalSeconds & "秒")