stustarz Posted February 21, 2003 Posted February 21, 2003 Quick question - may not have an easy answer though. Is there any way of counting the number of files inside a directory? Quote Visit: VBSourceSeek - The VB.NET sourcecode library "A mere friend will agree with you, but a real friend will argue."
*Experts* Bucky Posted February 22, 2003 *Experts* Posted February 22, 2003 The GetFiles method of the Directory class returns an array of Strings that contain filenames, so you can just check the length of the array to get the number of files. Dim numberOfFiles As Integer Dim path As String = "c:\blah\" numberOfFiles = System.IO.Directory.GetFiles(path).Length Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.