Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Windows Properties (Excel 2002)

    Hi all,

    I'm interested in extracting the date modified of files within a windows folder, the prupose for this would be to graph the times of the modified files, if some one could guide me in the right direction to get me started that would be great.

    Thanks,
    Darryl.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Windows Properties (Excel 2002)

    Simple:

    Sub gooo()
    MsgBox FileDateTime("c:databook2.xls")
    End Sub
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Windows Properties (Excel 2002)

    See if you can use the following example as a starting point:

    Sub ListFiles(strFolder As String)
    Dim fso As Object
    Dim fld As Object
    Dim fil As Object
    Dim i As Integer
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set fld = fso.getfolder(strFolder)
    For Each fil In fld.Files
    i = i + 1
    Range("A" & i) = fil.Name
    Range("B" & i) = fil.DateLastModified
    Next fil
    End Sub

    Sub Test()
    ListFiles "C:Excel"
    End Sub

  4. #4
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Windows Properties (Excel 2002)

    Worked great!

    Thank you Hans.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •