I would like to know how to cut up strings. Can this be done?

lets say that a user enters a full path and file name into one textbox.

The textbox saves it to the database.

I want to cut off the path and end up with just the file name or wild card. how would i do that?

example:
c:\windows\dog.exe
or
c:\windows\*.*
or
\\servername\c$\windows\command.com