Give full path as input. Avoid relative paths.
return File.Exists(FinalPath);
I use WinForms and my way to use File.Exists(string path) is the next one:
public bool FileExists(string fileName)
{
var workingDirectory = Environment.CurrentDirectory;
var file = $"{workingDirectory}\{fileName}";
return File.Exists(file);
}
fileName must include the extension like myfile.txt
System.IO.File.Exists(path)
using System.IO;
if (File.Exists(path))
{
Console.WriteLine("file exists");
}
Source: Stackoverflow.com