Retrieving File Modified Date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Enij
    New Member
    • Apr 2009
    • 13

    Retrieving File Modified Date

    Hi All,

    I'm using VB.net 2003 Standard Edition, and I'm trying to retrieve the file modified date. Sounds painfully simple. Yup. But ... I cannot, for the life of me, figure it out. After numerous Google searches with no joy, I decided either the answer was so simple nobody ever asked the question, or ... you needed to be on NASA's payroll to comprehend the answer :)

    I've created a System.IO.FileI nfo object, and have collected info from the three methods: CreationTime, LastAccessTime, and LastWriteTime, but they aren't giving me the same data as XP Windows Explorer is.

    In Explorer, there is a Date Modified field (currently reading 2008 on the file in question), but using the FileInfo methods they return 2007, 2009, 2009.

    Is there another IO object I can use to get this 'modified' date? Or, does anyone know the API routine that will yield the same results?

    Many Thanks,
  • Enij
    New Member
    • Apr 2009
    • 13

    #2
    For some reason (probably one of those 'problem between keyboard and chair' errors), using FileInfo.LastWr iteTime is yielding the correct results, displaying exactly what Explorer does as its 'Date Modified' field.

    Problem solved. I think I was the problem ...

    Comment

    Working...