วิธี DriveExists ASP
วิธี DriveExists ผลตอบแทนที่แสดงให้เห็นถึงการดำรงอยู่ของไดรฟ์ที่กำหนดค่าแบบบูล หากไดรฟ์ที่มีอยู่ผลตอบแทนจริงเท็จอย่างอื่น
ไวยากรณ์
FileSystemObject.DriveExists(drive)
参数 | 描述 |
---|---|
drive | 必需的。驱动器字母或者完整的路径规定。 |
ตัวอย่าง
<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
if fs.DriveExists("c:")=true then
response.write("Drive c: exists!")
else
response.write("Drive c: does not exist.")
end If
set fs=nothing
%>
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
if fs.DriveExists("c:")=true then
response.write("Drive c: exists!")
else
response.write("Drive c: does not exist.")
end If
set fs=nothing
%>
อ้างอิงวัตถุ FileSystemObject สมบูรณ์