How can i find parent directory from the given full path?
Dear friend,,,
I want to find the parent directory from the given full path....
e.g.
If the full path is:c:\\ProgramFiles\\Windows\\ABC
i want to find the parent directory means Windows from this full path then how can i do it...
The full path may have many many sub directory...
Please reply me soon...
Visit expertamadavadi.com
kishan gajjarPosted May 16, 2009, 7:39 PM
Kirtan PatelPosted May 16, 2009, 5:02 PM
{
string fullpath = textBox1.Text ;
string Parent = Directory.GetParent(fullpath).ToString();
textBox2.Text = Parent;
}