Results 1 to 4 of 4

Thread: Get Date of when File was created.

  1. #1

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765

    Get Date of when File was created.

    How can I get the date of when a file was created.
    Don't Rate my posts.

  2. #2
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670
    I think the function is GetFileDateTime or something like that.
    'Buzby'
    Visual Basic Developer
    "I'm moving to Theory. Everything works there."

  3. #3
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918
    You can use the FileSystemObject which is part of the scripting runtime, ie add a reference to Microsoft Scripting Runtime.
    VB Code:
    1. Dim fso As FileSystemObject
    2.     Set fso = New FileSystemObject
    3.     Debug.Print fso.GetFile("myfile.dat").[B]DateCreated[/B]
    You can also use, DateLastModified and DateLastAccessed among others.

    Cheers

  4. #4

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765
    Sweet, thanks.
    Don't Rate my posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width