File name taken in a textbox without extension and want to check that it already present in a specified directory. if exists want to display an error msg.. i have following code with me.
The text of this thread is not in this database — only its details are. Read it on the old site: File name taken in a textbox without extension and want to check that it already present in a specified directory. if exists want to display an error msg.. i have following code with me.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

FroglegRank #1,020 · 1.9K reputationPosted Sep 6, 2012, 10:58 PM EDT
if(File.Exist("C:\myfile.txt"))
{
//do whatever
}
VulpesRank #55 · 29.2K reputationPosted Sep 7, 2012, 12:38 AM EDT