<pre> Imports System.IO
Dim strFileSize As String = ""
Dim di As New IO.DirectoryInfo("C:temp")
Dim aryFi As IO.FileInfo() = di.GetFiles("*.*")
Dim fi As IO.FileInfo
For Each fi In aryFi
if fi.Extension = ".jpg" or fi.Extension = ".gif" or fi.Extension = ".bmp" ''etc etc etc
strFileSize = (Math.Round(fi.Length / 1024)).ToString()
Console.WriteLine("File Name: {0}", fi.Name)
Console.WriteLine("File Full Name: {0}", fi.FullName)
Console.WriteLine("File Size (KB): {0}", strFileSize )
Console.WriteLine("File Extension: {0}", fi.Extension)
Console.WriteLine("Last Accessed: {0}", fi.LastAccessTime)
Console.WriteLine("Read Only: {0}", (fi.Attributes.ReadOnly = True).ToString)
End if
Next</pre>
Adjust your code in order to match the given file extensions.
Bye
Last Wiki Answer Submitted: May 26, 2008 9:10 am by alessandro.panzetta9,695 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.