VB6 检查文件时间,不用CreateObject,用内置函数 FileDateTime新建From1(窗体),新建Command1(按钮CommandButton),代码:
Private Sub Command1_Click()
Dim strFN As String
strFN = App.Path & "\manongku.txt"
MsgBox "文件的最后修改时间为:" & FileDateTime(strFN)
End Sub运行结果:
文件的最后修改时间为:2023/12/19 22:36:48