string fpath = @"c:\data\doc.dat"; if (File.Exists(fpath) == true){ //ファイルがある場合の処理 }else{ //ファイルがない場合の処理 }