Private Sub ChkFile(ByVal Files1 As Files, ByVal Files2 As Files)
    Dim File1 As File
    Dim File2 As File
    Dim blnHave As Boolean
    
    For Each File1 In Files1
        blnHave = False
        For Each File2 In Files2
            '檢查檔案名稱一不一樣
            If File1.Name = File2.Name Then
                blnHave = True
                Exit For
            End If
        Next
        If blnHave Then
            '檢查修改日期一不一樣
            If File1.DateLastModified > File2.DateLastModified Then
                FileCopy File1.Path, File2.Path
            End If
        Else
            Kill File1.Path
        End If
    Next
    
End Sub网上找到的这段代码但不知道以上代码的ChkFile控件如何添加请高人指点
象是做文件对比更新的