I have a string:
vb.net Code:
Dim strPath as string = "C:\abc\INV042.PDF"
How do I cut the string so that I only have "INV042.PDF"?
Printable View
I have a string:
vb.net Code:
Dim strPath as string = "C:\abc\INV042.PDF"
How do I cut the string so that I only have "INV042.PDF"?
You can use String.Split method, but I advise to use System.IO.FileInfo class which already has this functionality and much more.
Code:Dim fi As New IO.FileInfo("C:\abc\INV042.PDF")
MsgBox fi.Name