Get only file name from str
-
Hi How can i get only the file name from string who consist full path? best regards
when i want to read something good just seat and type it
-
fullPath.Substring(fullPath.LastIndexOf('\\')+1)
Is the MSDN really so hard to read? :sigh:Greeeg wrote:
Is the MSDN really so hard to read?
No it isn't. Have you read it? System.IO.Path.GetFileName
only two letters away from being an asset
-
Greeeg wrote:
Is the MSDN really so hard to read?
No it isn't. Have you read it? System.IO.Path.GetFileName
only two letters away from being an asset
-
Greeeg wrote:
Is the MSDN really so hard to read?
No it isn't. Have you read it? System.IO.Path.GetFileName
only two letters away from being an asset
-
Hi How can i get only the file name from string who consist full path? best regards
when i want to read something good just seat and type it
-
So what? Both solutions will work. My point is that it can't be so hard to open up the MSDN (local or online), go to the
string
orIO
members and look if there's a function that fits my needs. Nichts für ungut ;)You're solution will work, so long as the path seperatation character is a backslash. This is not always the case and is not platform-independent. Using the correct method, pointed to by Mark, will work no matter what the platform or seperation character happens to be.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
i am sorry but i really have not time to read it.Thank's for help
when i want to read something good just seat and type it
papa80 wrote:
i am sorry but i really have not time to read it.
That's funny!! Looking it up on MSDN, or hitting F1 in Visual Studio, probably would have taken you 3 minutes to find the answer. How long did it take you to post the question on CP and wait for answer?
Dave Kreskowiak Microsoft MVP - Visual Basic