[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 520
  • Last Modified:

How to pick the substring in VB.NET

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
0
searchsanjaysharma
Asked:
searchsanjaysharma
1 Solution
 
CodeCruiserCommented:
Dim filename As String = System.IO.Path.GetFileNameWithoutExtension(yourpath)
0
 
searchsanjaysharmaAuthor Commented:
ok
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now