Hello,
Here is a way to do it:
string str1= "D:/Folder1/abc";
string[] split = str1.Split("/");
string lastBit = split[split.Length-1];
Response.Write(lastBit);
But I think you may have your path separator the wrong way round. ie "\" not "/".
The your code is:
string str1 = @"D:\Folder1\abc";
string[] split = str1.Split(Path.DirectorySeparatorChar);
string lastBit = split[split.Length - 1];
Response.Write(lastBit);
Valery.