Dim dlg As New FolderBrowserDialog
If dlg.ShowDialog = DialogResult.Ok Then
MessageBox.Show("你选择的目录是:" & dlg.SelectedPath,"提示")
For Each dr As DataRow In DataTables("表A").Select("第一列 is not null")
For Each file As String In FileSys.GetFiles(dlg.SelectedPath)
Dim name As String = FileSys.GetName(file)
If name.Contains(dr("第一列")) Then
FileSys.CopyFile(file, ProjectPath & "图片/" & name, True)
If dr.IsNull("第二列")
dr("第二列") = name
Else
dr("第二列") &= vbcrlf & name
End If
End If
Next
Next
DataTables("表A").datacols("第二列").DefaultFolder = ProjectPath & "图片/"
End If