Can I put the name of folder in listbox?
#####Like that#####
Folder1
File1
File2
Folder2
File1
File2
******Not like that******
C:\Users\a11\Desktop\File1
C:\Users\ b11\Documents\File2
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Khargesh RajputRank #616 · 3.9K reputationPosted Apr 19, 2015, 8:13 PM EDT
Asp.Net HeinRank #6,010 · 279 reputationPosted Apr 19, 2015, 9:30 PM EDT
Khargesh RajputRank #616 · 3.9K reputationPosted Apr 20, 2015, 12:13 AM EDT
int index1 = value.LastIndexOf('/');
if (index1 != -1)
{
string folder= fullpath.Substring(index1);
}
anu ja56 reputationPosted Feb 3, 2020, 6:38 PM EST