Metoda DriveExists w ASP
Definicja i użycie
Metoda DriveExists zwraca wartość logiczną wskazującą, czy określony napęd istnieje. Jeśli napęd istnieje, zwraca True, w przeciwnym razie zwraca False.
Gramatyka:
FileSystemObject.DriveExists(napęd)
parametr | opis |
---|---|
napęd | jest obowiązkowa. Litera napędu lub pełna ścieżka określająca. |
instancja
<% zmień fs ustaw fs=Server.CreateObject("Scripting.FileSystemObject") jeśli fs.DriveExists("c:")=true then response.write("Dysk c: istnieje!") else response.write("Dysk c: nie istnieje.") end If ustaw fs=nothing %>