Hi,
How would I retrive the folder name a file is in?
In this example I just want the highlighted folder name:
C:\Program Files\FolderNameIWant\Application.ex e
I can get the path excluding the file using various methods such as:
But cannot figure out how to return just the top level folder!
Thanks.
How would I retrive the folder name a file is in?
In this example I just want the highlighted folder name:
C:\Program Files\FolderNameIWant\Application.ex e
I can get the path excluding the file using various methods such as:
Code:
Dim intPos As Integer
intPos = FileFullPath.LastIndexOfAny("\")
intPos += 1
Messagebox.show(FileFullPath.Substring(0, intPos))
Thanks.
Comment