private void okBtn_Click(object sender, EventArgs e) { Cursor = Cursors.WaitCursor; try { ProcessDirNode(treeView1.Nodes); RemoveEmptyChildDirs(baseDirectory); } finally { Cursor = Cursors.Default; } } void RemoveEmptyChildDirs(string path)