|
-
Jan 28th, 2002, 08:53 AM
#1
Thread Starter
New Member
FindNextFile returns incorrect file created date
Have any of you had trouble with the dates returned by the FindFirstFile and FindNextFile API functions?
Some files are returned with what appears to be a default created-date of 01/01/1980, even though dates for most other files are returned correctly.
To recreate the problem: try using the functions to return the created-date of a system file such as boot.ini or ntdetect.com
Incidentally, the FileSystemObject returns the same invalid dates.
I'd very much appreciate some help on this. Either a fix or a workaround, either is fine.
Many thanks
PS: I'm using Windows 2000.
-
Jan 28th, 2002, 10:31 AM
#2
Fanatic Member
See if this MSDN article helps.
It does what you want, using the FindFirstFile and FindNextFile API functions.
-
Jan 28th, 2002, 12:05 PM
#3
Thread Starter
New Member
Thanks Jerry,
After further investigation using the VB FileDateTime() function employed in the article you highlighted, I've discovered that the problem is occurring where files have no created date at all. The FindNextFile API function tends to default these to 1/1/1980, while the VB FileDateTime() function decides that these should be reported as the Modified date instead.
All very odd, but at least I've got to the bottom of it.
Thanks very much for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|