FSO & sharename

Results 1 to 2 of 2

Thread: FSO & sharename

  1. #1
    Join Date
    Dec 1969

    Default FSO & sharename

    I&#039;m working on iterating through all drives on my system and I get the following error when using the property SHARENAME. Does anyone know what I&#039;ve done wrong. I&#039;ve posted my code plus the error. <BR><BR>&#060;%<BR>dim objdr, objfil, item, fso<BR><BR>set fso = server.createobject("scripting.filesystemobject")< BR>set objfil = fso.drives<BR><BR>for each item in objfil<BR> if item.drivetype = 3 then<BR> response.write item.driveletter & " : " & item.isready & "<BR>"<BR> if item.isready then<BR> response.write item.driveletter & " : " & item.sharename & "<BR>"<BR> else<BR> response.write "Remote Drive [" & item.driveletter & "] Isready property is false<BR>"<BR> end if<BR> end if<BR>next<BR>%&#062;<BR><BR>G : False<BR>Remote Drive [G] Isready property is false<BR>H : True<BR><BR>Microsoft VBScript runtime error &#039;800a0044&#039; <BR><BR>Device unavailable <BR><BR>/drives.asp, line 20 <BR><BR><BR><BR>Thanks, Jeff

  2. #2
    Join Date
    Dec 1969

    Default RE: FSO & sharename

    Looks like you are using the If condition to check for shared network drives. You could just use the drivetype property and use case for one variable and then loop through the drives. Not sure what you are trying to see here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts