Getting just filename from FileDialog.FileName without path

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using the FielDialog class and it's FileName propertie I can know the Path
and file name selected by the user, but now I need to know only the file name
without the full path (eg. "C:\folder1\folder2\filename.txt", I just need the
"filename.txt"), how can I do it?
 
System.IO.Path.GetFileName()

Using the FielDialog class and it's FileName propertie I can know the Path
and file name selected by the user, but now I need to know only the file
name
without the full path (eg. "C:\folder1\folder2\filename.txt", I just need
the
"filename.txt"), how can I do it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Remove text 1
WebClient 2
Get OpenFileDialog filename path... 6
Get filename without the path - Beginner in VB 3
Return Filename 3
Directory.Move bug when using closing backslash? 2
Lock() 3
Get Path of file 5

Back
Top