Metodo GetDriveName di ASP

Definizione e utilizzo

Il metodo GetDriveName restituisce una stringa che rappresenta il nome del drive specificato per il percorso.

Sintassi:

FileSystemObject.GetDriveName(path)
parametro descrizione
path obbligatorio. Può restituire il percorso del nome del drive.

istanza

<%
dim fs,dname
set fs=Server.CreateObject("Scripting.FileSystemObject")
dname=fs.GetDriveName("c:\test\test.htm")
Response.Write(dname)
set fs=nothing
%>

Output:

c: