|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Best ways to list filesUm i am trying to make a program for my school and i need a way to scan
the entire drive such as C drive and find all the files with specific extensions... i think i know a way but its way too complex and long... haha thank you if you can help :D E mail: Chung4***@aol.com Option Explicit On
Option Strict On Imports System Imports System.IO Class DirectoryLister Public Shared Sub Main() Dim dir As New DirectoryInfo(".") Dim f As FileInfo For Each f In dir.GetFiles("*.cs") Dim name As [String] = f.FullName Dim size As Long = f.Length Dim creationTime As DateTime = f.CreationTime Console.WriteLine("{0,-12:N0} {1,-20:g} {2}", size, creationTime, name) Next f End Sub End Class http://www.mycodebank.com/Snippet,139.aspx Jason wrote: Show quoteHide quote > Um i am trying to make a program for my school and i need a way to scan > the entire drive such as C drive and find all the files with specific > extensions... i think i know a way but its way too complex and long... > haha thank you if you can help :D > > E mail: Chung4***@aol.com |
|||||||||||||||||||||||