My.Computer.FileSystem.GetName
Imports System.Runtime.Serialization
Public Class Tester
Public Shared Sub Main
For Each oneItem As String In My.Computer.FileSystem.GetDirectories("c:\\",FileIO.SearchOption.SearchTopLevelOnly, "*.txt")
Console.WriteLine("[" & My.Computer.FileSystem.GetName(oneItem) & "]")
Next oneItem
End Sub
End Class
Related examples in the same category