Link to home
Create AccountLog in
Avatar of rp
rpFlag for Portugal

asked on

Vb.net 2010 get part of string

I need extract file name from a string, like "c:\tmp\test.txt". Vb.net have any function to do this. I need extract test.txt
ASKER CERTIFIED SOLUTION
Avatar of nepaluz
nepaluz
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Éric Moreau
You can also use Path.GetFileName():
http://msdn.microsoft.com/en-us/library/system.io.path.getfilename(VS.80).aspx

        Dim myString As String = "c:\tmp\test.txt"
        Dim FileName As String = System.IO.Path.GetFileName(myString)
Lol...two of us posting on a closed question.  =D