How to check if one path is a child of another path? Just checking for substring is not a way to go, because there can items such as . and .., etc
In C# you can do it like this:
string cp = Path.GetFullPath(childPath); string pp = Path.GetFullPath(parentPath); if(pp.StartsWith(cp)) return true; else return false;