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?
 
Back
Top