Getting date downloaded from text file (1 Viewer)

David b

Registered User.
Local time
Today, 08:33
Joined
Mar 2, 2003
Messages
102
I download a text file and save it on the desktop. My app imports the data from the text file and compares it with data already stored and advises of discrepancys.
Is it possible to get the date created from the text file so that the user can see when the last download was ?
David b
 

ghudson

Registered User.
Local time
Today, 03:33
Joined
Jun 8, 2002
Messages
6,194
Using the FileDateTime function will allow you to get the date the file was created or last updated. Check the help files for the FileDateTime Function more info and examples.

HTH
 

David b

Registered User.
Local time
Today, 08:33
Joined
Mar 2, 2003
Messages
102
That`s brilliant. Thanks
David b
 

David b

Registered User.
Local time
Today, 08:33
Joined
Mar 2, 2003
Messages
102
Next question is what if the txt file does not exist. Instead of "#error" I could do with an explaination displayed in the text box
David b
 

ghudson

Registered User.
Local time
Today, 03:33
Joined
Jun 8, 2002
Messages
6,194
This should get you on the right track...
Code:
    If Dir("C:\Temp\test.txt") <> "" Then
        MsgBox "File does exist"
        MsgBox FileDateTime("C:\Temp\test.txt")
    Else
        MsgBox "File does not exist"
    End If
HTH
 

David b

Registered User.
Local time
Today, 08:33
Joined
Mar 2, 2003
Messages
102
That`s great. Thanks again.

BTW still can not get that save and zip to A:\ routine from last week to run.

David b
 

Users who are viewing this thread

Top Bottom