I am looking for an efficient way to search if a file exist in a given directory. The problem is I do not know the full path including all the subfolders. I only know the top level folder of the directory. Is there a way to search if a file exist in a entire directory without including the full path.
//I would like to try this below
foreach(var file in files)
{
string filename = file.Name;
bool does_it_exist = File.Exists(C:\\,filename);
Console.WriteLine(does_it_exist);
}