Here is one quick hack that gives you the solution (C#):
string test = @"[D:\Employee management system\EMP details11\Sample.doc]";
string res = test.Replace("[", "");
res = test.Replace("]", "");
res = System.IO.Path.GetFileName(res);
VB.NET:
Dim test As String = "[D:\Employee management system\EMP details11\Sample.doc]"
Dim res As String = test.Replace("[", "")
res = test.Replace("]", "")
res = System.IO.Path.GetFileName(res)
and here is another one (C#):
string test = @"[D:\Employee management system\EMP details11\Sample.doc]";
string res = test.Replace("[", "");
res = test.Replace("]", "");
string[] splits = res.Split('\\');
res = splits[splits.Length - 1];
VB.NET:
Dim test As String = "[D:\Employee management system\EMP details11\Sample.doc]"
Dim res As String = test.Replace("[", "")
res = test.Replace("]", "")
Dim splits() As String = res.Split(Microsoft.VisualBasic.ChrW(92))
res = splits((splits.Length - 1))