Instead of:
if (File.Exists(path[0]))
{
foreach (string fileidc in fileid)
{
Console.WriteLine("{0} ", fileidc);
}
}
Do you mean:
if (File.Exists(path[0]))
{
Console.WriteLine("{0} ", fileidb);
}
Also, you can probably omit the File.Exists check. If Directory.GetFiles found it, the file exists (unless it got deleted after Directory.GetFiles found it).