A Use the following code:
Public Sub DisplayDriveDirectories(drivePath As String)
If Directory.Exists(drivePath) Then
For Each dirPath As [String] In Directory.GetDirctories(drivePath)
Dim dir As New DirectoryInfo(drivePath)
Dim numFiles As Integer = dir.TotalFiles
Console.WriteLine("{0} : {1} files.", dir.Name, numFiles)
Next
End If
End Sub
B Use the following code:
Public Sub DisplayDriveDirectories(drivePath As String)
If Directory.Exists(drivePath) Then
For Each dirPath As [String] In Directory.GetDirctories(drivePath)
Dim dir As New DirectoryInfo(drivePath)
Dim numFiles As Integer = dir.Length
Console.WriteLine("{0} : {1} files.", dir.Name, numFiles)
Next
End If
End Sub
C Use the following code:
Public Sub DisplayDriveDirectories(drivePath As String)
If Directory.Exists(drivePath) Then
For Each dirPath As [String] In Directory.GetDirctories(drivePath)
Dim dir As New DirectoryInfo(drivePath)
Dim numFiles As Integer = dir.GetFiles().Length
Console.WriteLine("{0} : {1} files.", dir.Name, numFiles)
Next
End If
End Sub
D Use the following code:
Public Sub DisplayDriveDirectories(drivePath As String)
If Directory.Exists(drivePath) Then
For Each dirPath As [String] In Directory.GetDirctories(drivePath)
Dim dir As New DirectoryInfo(drivePath)
Dim numFiles As Integer = dir.Size
Console.WriteLine("{0} : {1} files.", dir.Name, numFiles)
Next
End If
End Sub