GarySB
asked on
How to read File Date Created using VB6
Using Visual Basic 6.
FileDateTime only gives the Date Modified.
I need to read the Date Created and have it work on XP, Vista and Win7.
The FileSystemObject seems to warn about compatibility problems.
Please provide a vb6 example, Thank You
FileDateTime only gives the Date Modified.
I need to read the Date Created and have it work on XP, Vista and Win7.
The FileSystemObject seems to warn about compatibility problems.
Please provide a vb6 example, Thank You
ASKER
If it has FileSystemObject installed is the exact issue I read about.
My goal is to read when my program was installed.
Can FileSystemObject be included with my setup package to ensure the user will have it or will that cause a problem?
I have to be sure not to cause an error.
* Is it possible instead to read the created date of a registry entry, folder or something else?
Thank You
My goal is to read when my program was installed.
Can FileSystemObject be included with my setup package to ensure the user will have it or will that cause a problem?
I have to be sure not to cause an error.
* Is it possible instead to read the created date of a registry entry, folder or something else?
Thank You
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry this took so long but I've had several "out of the office" type issues over the past few days... and, there was quite a bit of leg-work to do to come up with a solution I think you might like.
Quick recap is I created a VB6 console app (yes console... runs in command prompt window rather than gui forms) that uses only Win32 API calls for all screen and file I/O. The executable is capable of displaying all 3 timestamps a file has (but, read the "readme.txt" file in the attached archive to find out how to enable Windows OS from Vista thru Win10 to actually track Last Access timestamp). The mere act of running the executable will update its Last Access timestamp... so if you should run a different copy of the executable than the one you want to view. It's OK to rename it if you want.
Normal usage would be to run "ShowTimes pathtosomefilename" from a command prompt. If you omit the filename argument the app looks for a file by its own name.
That would be equivalent to ShowTimes ShowTimes.exe
If you renamed it then equiv. would be: newexename newexename
Here is a zip archive of the entire project and documentation of how to build/modify it.
ShowTimes.zip
Quick recap is I created a VB6 console app (yes console... runs in command prompt window rather than gui forms) that uses only Win32 API calls for all screen and file I/O. The executable is capable of displaying all 3 timestamps a file has (but, read the "readme.txt" file in the attached archive to find out how to enable Windows OS from Vista thru Win10 to actually track Last Access timestamp). The mere act of running the executable will update its Last Access timestamp... so if you should run a different copy of the executable than the one you want to view. It's OK to rename it if you want.
Normal usage would be to run "ShowTimes pathtosomefilename" from a command prompt. If you omit the filename argument the app looks for a file by its own name.
That would be equivalent to ShowTimes ShowTimes.exe
If you renamed it then equiv. would be: newexename newexename
Here is a zip archive of the entire project and documentation of how to build/modify it.
ShowTimes.zip
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for the examples. I'll try them today and let you know how it worked.
ASKER
Thank You, I have what I need now
You're welcome and I'm glad I was able to help.
If you expand the “Full Biography” section of my profile you'll find links to some articles I've written that may interest you.
Marty - Microsoft MVP 2009 to 2016
Experts Exchange MVE 2015 and 2016
Experts Exchange Top Expert Visual Basic Classic 2012 to 2016
If you expand the “Full Biography” section of my profile you'll find links to some articles I've written that may interest you.
Marty - Microsoft MVP 2009 to 2016
Experts Exchange MVE 2015 and 2016
Experts Exchange Top Expert Visual Basic Classic 2012 to 2016
Open in new window