Ch13-03-01.aspx 如何检查文件夹是否存在
Sub Button1_Click(Obj As Object, E As EventArgs)
If Trim(Path1.Text) = "" then
Show1.InnerHTML = "请输入文件夹名称!"
Exit Sub
End If
Show1.InnerHtml = ""
If Directory.Exists(Path1.Text) = True Then
Show1.InnerHTML = Show1.InnerHTML & "指定的文件夹存在!"
Else
Show1.InnerHTML = Show1.InnerHTML & "指定的文件夹不存在!"
End if
End Sub
文件夹名称:
Runat="Server" />
OnClick="Button1_Click" Runat="Server" />
BorderColor="#FF0000" Runat="Server" />