public static bool IsFileInAPath(string filepath, string pathToCheck) { return filepath.ToLower().IndexOf(pathToCheck.ToLower()) != -1; }