"H:" is a network drive right...? then you need to do this
Set WshNetwork = server.CreateObject("WScript.Network")
set NetDrive=WshNetwork.MapNetworkDrive("H:\", "\\Server\Share" ) 'second parameter is optional
but I don't think you can get size of the network drive.
dim fs,d,s
set fs=Server.CreateObject("Scripting.FileSystemObject")
set d=fs.GetDrive("H:")
s=d.totalsize
0
w00tasticAuthor Commented:
davidlars99,
Point 1: Wouldn't that be to map a network drive?, if so, the drive is already mapped at log on to \\studentserver\studentname$
Point 2: Same error as I was getting before.
Thanks anyway!
0
Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.
You don't have the drive already mapped on the server, where the ASP is running. You only have it mapped on the client. Remember, ASP stands for Active SERVER Pages. Nothing on the client computer matters when running ASP code.
0
w00tasticAuthor Commented:
You're right, I guess my head isn't screwed on straight today.
I thought it was working, but the C drive on the server just happens to be around the same size as on my machine here, and that's the size I was getting.
Okay, now what?
Is there some other way of doing this or not?
I want to put a number of things into a web page on the desktop that is mandatory on all student profiles here, including how much space they have left in their H drive.
How about running IIS on studentserver with a page that returns the quota info (which it can read) in XML, or other format, to the ASP page on your main web server.
I do not know how familiar you are with ActiveX. That would be perfect for this job. Ofcourse then it will work only with IE. You need to check something on the client's machine. ASP can not allow you to do that. Need something on the client's machine. Then you can have your ASP page interactign with the Activex page.
Thanks for all the suggestions guys, i'll look into them.
Now i'm thinking a bit clearer, i've decided my way of tackling this problem wasn't quite right.
What I need to do is extract data directly from the quota entries on the student server, which just happens to be running IIS.
Any idea's on this one?
I've seen a few bits of code about, and even some stuff on Experts Exchange..... but nothing that really suits what I want.
0
w00tasticAuthor Commented:
By the way, it's Server 2003 running IIS 6.0 and we only use Internet Explorer here.
You can have a webservice running on the student server such that when you pass it a student id, it will return the size of the student's directory on the server. You will need to create a server objects to read files/folder and get their size.
Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.
Set WshNetwork = server.CreateObject("WScri
set NetDrive=WshNetwork.MapNet
but I don't think you can get size of the network drive.