Need help with FileSystemObject

Results 1 to 2 of 2

Thread: Need help with FileSystemObject

  1. #1
    Raymond Guest

    Default Need help with FileSystemObject

    How do i get the available drive letters?<BR>I tried playing around with filesystemobject, this is as far as i got..<BR>set ds=server.CreateObject("Scripting.FileSystemObject ")<BR>set dDrive=ds.GetDrive(****)<BR>for each drive in dDrive.driverletter<BR>%&#062;<BR><BR>&#060;a href="&#060;%=drive%&#062;"&#062;/&#060;%=drive%&#062;&#060;/a&#062;<BR>&#060;%<BR>next<BR>what do I put in the &#039;****&#039;?<BR>or is this the way to do it?<BR><BR>Thanks in advance,<BR>Raymond

  2. #2
    Andrew S Guest

    Default RE: Need help with FileSystemObject

    There&#039;s a Drives collection<BR><BR>this from the vbscript reference:<BR><BR>Function ShowDriveList<BR> Dim fso, d, dc, s, n<BR> Set fso = CreateObject("Scripting.FileSystemObject")<BR> Set dc = fso.Drives<BR> For Each d in dc<BR> n = ""<BR> s = s & d.DriveLetter & " - " <BR> If d.DriveType = Remote Then<BR> n = d.ShareName<BR> ElseIf d.IsReady Then<BR> n = d.VolumeName<BR> End If<BR> s = s & n & "<BR>"<BR> Next<BR> ShowDriveList = s<BR>End Function<BR><BR>

Posting Permissions

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