Dim si As String
For Each ff As String In FileSys.GetFiles (ProjectPath & "temp\")
Dim ifo As New FileInfo(ff)
Dim i As Integer = ifo.Length
Dim fs As DataRow = DataTables("fl").SQLFind("合成名='" & ifo.Name & "'")
If fs IsNot Nothing AndAlso ifo.LastWriteTime > CDate(fs.SQLGetValue ("修改日期")) Then '如果找到符合条件的行
MessageBox.Show( ifo.LastWriteTime & chr(13) & CDate(fs.SQLGetValue ("修改日期")))
If i < 1024 Then
si = i & " B"
ElseIf 1048576 > i AndAlso i >= 1024 Then
si = round2(i / 1024, 2) & " KB"
ElseIf 1073741824 > i AndAlso i >= 1048576 Then
si = round2(i / 1024 / 1024, 2) & " MB"
ElseIf 1099511627776 > i AndAlso i >= 1073741824 Then
si = round2(i / 1024 / 1024 / 1024, 2) & " GB"
End If
fs.SQLSetValue ("大小", si)
fs.SQLSetValue ("修改日期", ifo.LastWriteTime)
ShowWaitDialog(New Operation(Function() As Boolean '等待开始
fs.SQLInsertFile("fl", ff) '插入文件
End Function), Nothing) '等待结束'
End If
Next
DataTables("fl").Load