We help IT Professionals succeed at work.

How to pick the substring in VB.NET

searchsanjaysharma
on
I have the following text in a variable.

Dim s as string
s="d:\pics\xxxxxxxx,jpg"

I want to pick on the file name and not the extension and path.
The filename can be of any length
Comment
Watch Question

BRONZE EXPERT
Most Valuable Expert 2012
Top Expert 2014
Commented:
Dim filename As String = System.IO.Path.GetFileNameWithoutExtension(yourpath)

Author

Commented:
ok

Explore More ContentExplore courses, solutions, and other research materials related to this topic.