public static bool IsFileName(string filepath, string filenameToCheck) { return Path.GetFileName(filepath).ToLower() == filenameToCheck.ToLower(); }