วิธีASP DriveExists
❮ อ้างอิงวัตถุ FileSystemObject ที่สมบูรณ์
วิธีการ DriveExists ส่งกลับค่าบูลีนที่ระบุว่ามีไดรฟ์ที่ระบุอยู่หรือไม่ คืนค่า True หากมีไดรฟ์และ False หากไม่มี
ไวยากรณ์
FileSystemObject.DriveExists(drive)
Parameter | Description |
---|---|
drive | Required. A drive letter or a complete path specification |
ตัวอย่าง
<%
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 ที่สมบูรณ์