vb.net folder name get

VNote 2022.05.24 06:59:59 *:
C:\Windows\SysWOW64

1.
Dim split As String() = filePath.Split("\")
Dim parentFolder As String = split(split.Length - 1)

 

parentFolder = SysWOW64

 

 

2.

 Dim filePath As String = "C:\Windows\SysWOW64"

 Dim directory As String = Path.GetFileName(filePath)

 

directory = SysWOW64