I have a project where I want to check if a file exist in a directory.
if (File.Exists("\\Galerija\\" + Session["up_ime"] + "\\" + Session["slika_profila"]))
{
Label1.Text = "exist";
}
else {
Label1.Text = "does not exist";
}
The directory of the file is \Galerija\admin\slika.jpg. The file is in the directory, but I get returned that it doesn't. I also printed the path I give to File.Exists() to the label and it should be correct.
I don't see what is the problem. -The file should be found.
Galerijain the application's directory?