取得指定驱动器的根文件夹

代码:

<!DOCTYPE html>

<html>

<body>

 

<%

dim fs,d

set fs=Server.CreateObject("Scripting.FileSystemObject")

set d=fs.GetDrive("c:")

Response.Write("The rootfolder is " & d.RootFolder)

set d=nothing

set fs=nothing

%>

 

</body>

</html>

结果:

The rootfolder is C:\

相关文章