Drive Name by using FSO

We can get the name of the drive in which the file reside by using drive property.

<% Dim FSOobj,FilePath,details
FilePath=Server.MapPath("text.txt") ' located in the same director
Set FSOobj = Server.CreateObject("Scripting.FileSystemObject")
Set details=FSOobj.GetFile(Server.MapPath("text.txt"))
Response.Write " Drive Name = " & details.Drive
Set FSOobj = Nothing
%>

Be the first to post comment on this article :




Google+

Post Comment This is for short comments only. Use the forum for more discussions.




HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2019 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer