Guys, I can't still figure out how to show to a user the file info of a file programamtically. Can I just use the Properties window that Windows use to show all the detals of a file (e.g. name, type, size, path, date created ect.)
I am using the IO namespace, can anyone help me please?

Try this :

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim Info As New FileInfo("D:\000.jpg")
    MsgBox("Name : " & Info.Name & vbCrLf & _
        "Length : " & Info.Length & " bytes" & vbCrLf & _
        "Type : " & Info.Extension & vbCrLf & _
        "Date Created : " & Info.CreationTime & vbCrLf & _
        "Path : " & Info.DirectoryName & vbCrLf & _
        "Full Path : " & Info.FullName)
End Sub

Edited 4 Years Ago by Jx_Man: n/a

You can use the FileInfo class or the FileAttribute.
FileInfo has most of what you'll be looking for.

Imports System.IO
Module Module1

   Sub Main()
      Dim strInFile As String = "c:\science\test.txt"
      Dim fa As FileAttribute = File.GetAttributes(strInFile)
      Dim fi As New FileInfo(strInFile)
   End Sub
End Module
This question has already been answered. Start a new discussion instead.