JMO9966
asked on
VB.Net string parsing question
I'm having trouble parsing this string.
I need to get rid of the filename part of the following string, everything to the right of the last "\".
C:\JB\CustData\csv\Neill.c sv
I'm coding this with VB.Net
thanks,
JMO9966
I need to get rid of the filename part of the following string, everything to the right of the last "\".
C:\JB\CustData\csv\Neill.c
I'm coding this with VB.Net
thanks,
JMO9966
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Woops. Yes, if he actually wants to get *rid* of the filename part, like he says in the question, instead of in the sentence that arrived in my mind...
You can also pass the filename to a new FileInfo instance and get the info from that:
Dim fullPath As String = "C:\JB\CustData\csv\Neill. csv"
Dim fi As New System.IO.FileInfo(fullPat h)
Dim fileName As String = fi.Name
Dim filePath As String = fi.DirectoryName
Dim fullPath As String = "C:\JB\CustData\csv\Neill.
Dim fi As New System.IO.FileInfo(fullPat
Dim fileName As String = fi.Name
Dim filePath As String = fi.DirectoryName