i have a string of this kind..
string myFile1= @"C:\Documents and Settings\Desktop\ExcelSheets\2004abc.xls";
i want to get the 2004abc.xls..how can this be acheived?
i have been able to split the string and get individual values ..but how do i get the last one..2004abc.xls from this..
string[] arInfo = new string[6];
// define which character is seperating fields
string splitter = "\\";
char csplitter = Convert.ToChar(splitter);
arInfo = myFile1.Split(csplitter);
for(int x = 0; x < arInfo.Length; x++)
{
Response.Write(arInfo[x] + "
");
}
How to search for string
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

spgilmoreRank #1,616 · 964 reputationPosted Aug 31, 2004, 2:33 PM EDT
MykonineRank #2,671 · 521 reputationPosted Aug 31, 2004, 4:20 PM EDT