vb 循环读取 路径 判断文件是否存在
vb 怎样循环读取路径去判断文件是否存在?请看以下代码:
Private Sub Form_Load() txtstr = txtstr + "\\127.0.0.1\Eak\E1\1.txt;" & vbCrLf & _ "\\127.0.0.1\Eak\1\E1\1.txt;" & vbCrLf & _ "\\127.0.0.1\Eak\2\E1\1.txt;" & vbCrLf & _ "\\127.0.0.1\Eak\3\E1\1.txt;" & vbCrLfDim A() As StringDim OUTMSG As StringA() = Split(txtstr.Text, ";")For I = 1 To UBound(A()) - 1 OUTMSG = A(I) if Dir(OUTMSG)="" then msgbox "该文件不存在" else msgbox "该文件存在"end ifNEXT IEnd Sub