参考代码
Dim dtb As New DataTableBuilder("自动生成影片海报临时表")
dtb.AddDef("序号", Gettype(String), 100)
dtb.AddDef("片名", Gettype(String), 100)
dtb.AddDef("海报URL", Gettype(String), 100)
dtb.AddDef("影片URL", Gettype(String), 100)
'Tables("首页_Table3").DataSource = dtb.BuildDataSource()
Dim dir1 As new io.DirectoryInfo("D:\影片海报")
Dim dir2 As new io.DirectoryInfo("D:\迅雷下载")
Dim files1=dir1.GetFiles
Dim files2=dir2.GetFiles
For i As Integer = 0 To files1.length-1
'Dim dr1 As DataRow = DataTables("首页_Table3").AddNew()
'dr1("海报URL") = "D:\影片海报\" & files1(i).Name
Dim name = files1(i).name.replace(files1(i).Extension, "")
msgbox(name)
For Each file As object In files2
If file.name Like "*" & name & "*" Then
' dr1("影片URL") = "D:\迅雷下载\" & file.Name
msgbox(file.name)
End If
Next
Next