Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access the root directory with vbscript 1

Status
Not open for further replies.

emmanuelbeaudet

Programmer
Apr 16, 2002
51
CA
There is a systeme variable who contain the root drive that I can use in vbscript to get the root directory ?

thank you
 
Hello emmanuelbeaudet,

The function is the sample from documentation, I just show the use of it.
Code:
wscript.echo ShowRootFolder("c:")

Function ShowRootFolder(drvspec)
   Dim fso, f
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.GetDrive(drvspec)
   ShowRootFolder = f.RootFolder
End Function
regards - tsuji
 
Or this provide some useful info:

Response.Write "Server.MapPath with . : " & Server.MapPath(".") & "<br>"


Best regards,
J. Paul Schmidt, Freelance ASP Web Consultant
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
 
And this:

Response.Write "Server.MapPath with / : " & Server.MapPath("/") & "<br>"


Best regards,
J. Paul Schmidt, Freelance ASP Web Consultant
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top