For Each F As String In FileSys.GetFiles("D:\ZP\") Dim ifo As new FileInfo(f) Dim name As String = "" If name.IndexOf("在") Then name = ifo.name.Split("在")(0) Else name = ifo.name.Replace(ifo.Extension, "") End If Dim fdr As DataRow = DataTables("表A").Find(" 姓名 = '" & name & "'") If fdr IsNot Nothing Then fdr("照片") &= iif(fdr("照片")=Nothing, "", vbcrlf) & ifo.name End If Next
|