Results 1 to 8 of 8

Thread: Obtain information about files on your system RESOLVED

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2002
    Posts
    95

    Obtain information about files on your system RESOLVED

    I'm going to be making a properties form giving some basic info about a file that the user double clicks on in the filelist box. Things I want to obtain is the file size of the selected file and if possible the date that it was created. Is there a way I can do this?
    Last edited by justastef; Oct 1st, 2003 at 12:06 PM.

  2. #2
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    The following will return the Last Modified Date/Time, like:
    VB Code:
    1. MsgBox FileDateTime("C:\temp\SomeFile.txt")




    Bruce.

  3. #3
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Date/Time Modified & Size (in Bytes) like:
    VB Code:
    1. Dim strFileName As String
    2.  
    3. strFileName = "C:\temp\SomeFile.txt"
    4.  
    5. MsgBox "Date and Time : " & FileDateTime(strFileName) & vbCrLf _
    6.     & "File Size is " & FileLen(strFileName) & " Bytes"

  4. #4
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    Viking interrupting this thread to say ....

    Hppy B day Bruce !
    -= a peet post =-

  5. #5
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Originally posted by peet
    Viking interrupting this thread to say ....

    Hppy B day Bruce !
    Thanks mate

  6. #6
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    What are you doing here on your birthday? Go out and party Happy birthday


    Has someone helped you? Then you can Rate their helpful post.

  7. #7
    Hyperactive Member
    Join Date
    Nov 2002
    Location
    india
    Posts
    418
    hi,

    using scripting.filesystemobject u can solve u r problem.

  8. #8
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Originally posted by jayakumar
    hi,

    using scripting.filesystemobject u can solve u r problem.
    Certainly one way to obtain file info, but if you can do it without the overhead of the FSO, then why would you


    manavo11: Thankyou

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