how to get the filename using path in vb.net using c#

narasiman rao

narasiman rao

Nov 17 2014 5:26 AM
  I am retrieving the drafts folder file name from c folder.
   In c folder file as follows

  for retrieving the filename code as follows in vb.net 
 Dim strpath As String = "C:\Drafts\"
 Foldername = Directory.GetFiles(strpath, "*", SearchOption.TopDirectoryOnly)

 When i  run and debug in foldername path as follows

 i have one label in that label i want to store the AFF name.
 after 2nd backslash AFF is there.
i want to retrieve AFF after 2nd slash AFF is there.

  From the above path how to get AFF name after Back Slash.
for that how can i write the code in vb.net.

Answers (1)