App下载

demo_driveexists 在线工具

demo_driveexists 在线工具

<html>
<body>
<FONT COLOR=#ff0000><%
Set fs=Server.CreateObject("Scripting.FileSystemObject")

if fs.driveexists("c:") = true then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.Write("Drive c: exists.")
Else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.Write("Drive c: does not exist.")
End If

Response.write("<br />")

if fs.driveexists("g:") = true then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.Write("Drive g: exists.")
Else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.Write("Drive g: does not exist.")
End If

set fs=nothing
%></FONT>

</body>
</html>
运行结果