String dir = Path.GetDirectoryName(fullyQualifiedName); string root = Directory.GetParent(dir).FullName;