try
{
foreach (string d in Directory.GetFileSystemEntries(Server.MapPath("~/cs")))
{
if (File.Exists(d))
{
string t = d.Split('s')[1].Split('.')[0];
if (t == "\\gg3")
{
File.Delete(Server.MapPath("~/cs/" + d.Split('s')[1] + ""));
}
else
{
Response.Write("<script>alert('" + d.Split('s')[1].Split('.')[0] + "')</script>");
}
}
}
}
catch
{
Response.Write("<script>alert('文件不存在或路径错误')</script>");
}