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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Network Server Drive Space

Status
Not open for further replies.
Feb 1, 2001
116
US
I'm trying to update a web page with the drive space available on a server on our LAN. When I run this, I get an error with the "Set d=fs.GetDrive(drvPath)" command. If I run the same script against the web server the script is on, it works fine.

Any ideas?

<%
ws = "idmssql1"
drive = "c$"
drvPath = "\\" & ws & "\" & drive
Response.Write drvPath
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set d=fs.GetDrive(drvPath)
DiskSpace = FormatNumber((d.AvailableSpace / 1000) / 1000,0)
Response.Write "<td>" & DiskSpace & "MB</td>
%>
 
The anonymous account the script is running under does not have network credential. It fails on getting remote url.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top