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
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Kirtan PatelRank #292 · 8.6K reputationPosted May 16, 2009, 1:02 PM EDT
{
string fullpath = textBox1.Text ;
string Parent = Directory.GetParent(fullpath).ToString();
textBox2.Text = Parent;
}
kishan gajjar40 reputationPosted May 16, 2009, 3:39 PM EDT