Directory.GetFileSystemEntries : Directory « System.IO « VB.Net by API






Directory.GetFileSystemEntries

  
 

Imports System.IO

public class Test
   public Shared Sub Main
        Dim aryItems() As String
        Dim strPath As String = "C:\Program Files"
        Dim strItem As String

        aryItems = Directory.GetFileSystemEntries(strPath)
        For Each strItem In aryItems
            If Directory.Exists(strItem) Then
                Console.WriteLine("FOLDER " & strItem)
            Else
                Console.WriteLine("FILE " & strItem)
            End If
        Next strItem
   End Sub
End class

   
    
  








Related examples in the same category

1.Directory.CreateDirectory
2.Directory.Delete
3.Directory.Exists
4.Directory.GetCurrentDirectory()
5.Directory.GetDirectoryRoot
6.Directory.GetLogicalDrives()
7.Directory.GetParent
8.Directory.Move
9.Directory.SetCurrentDirectory