Get information about network share using ASP FileSystemObject?

Hello,

I am writing a new application in which I need to get info about a network share using ASP.  I am first trying FileSystemObject but keep getting an invalid procedure call or argument when I try the GetDrive method on the share.  Here is the code I am using:

      SET RS=Server.CreateObject("ADODB.Recordset")
      RS.Open "Select * from Storage", Application("Conn")
      While Not RS.EOF
            set fs=Server.CreateObject("Scripting.FileSystemObject")
            set d=fs.GetDrive(RS("share")
            response.write RS("share")&": "&d.FreeSpace&"<BR>"
            set d=nothing
            set fs=nothing
      RS.Movenext
      Wend
      RS.Close
      Set RS = Nothing

the value for RS("Share") is "\\10.1.11.5\Vol1$\data\public\NAS1".  This has to work where network drives are not mapped.  I can also specify a username/password combo for the share if necessary as the IUSER does not have access to the share, but the username/password is also stored in the DB.  Please help!
electricd7Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

electricd7Author Commented:
I guess I should specify that I am not really interested in freespace, although that is what i have in there.  I want to see what the USED space size is of that share (ie, how many bytes are in that folder).
0
electricd7Author Commented:
Updated code...since the spec i am after is actually size, here is what I now have.  I now get a "Path Not Found" error.
	SET RS=Server.CreateObject("ADODB.Recordset")
	RS.Open "Select * from Storage", Application("Conn") 
	While Not RS.EOF
		share = "\\"&RS("Host_addr")&"\"&RS("share")
		response.write share
		set fs=Server.CreateObject("Scripting.FileSystemObject")
		set d=fs.GetFolder(share)
		response.write share&": "&d.size&"<BR>"
		set d=nothing
		set fs=nothing
	RS.Movenext
	Wend
	RS.Close
	Set RS = Nothing

Open in new window

0
electricd7Author Commented:
Found solution myself.  Ran website under account which has access to this share rather than the anonymous user.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.