FileSystemObject doesnt return mapped Network Driv

Results 1 to 2 of 2

Thread: FileSystemObject doesnt return mapped Network Driv

  1. #1
    Join Date
    Dec 1969

    Default FileSystemObject doesnt return mapped Network Driv

    Hi,<BR> I have been trying to use the FileSystemObject to retrieve all the drives connected to my PC. My PC is on a network and I have mapped several Network drives other than my local HDD, FDD and CDROM drives. Now when I use the FileSystemObject.Drives property, I get only 3 drives namely the floppy drive, HDD and the CDROM drive but my mapped Network drives are not even listed !! I need to iterate through the mapped Network drive. Can anyone help me in this regard. I am attaching the code that I have used for the same. <BR><BR>dim MyFileObject<BR>set MyFileObject = Server.CreateObject("Scripting.FileSystemObject")< BR><BR>dim MyDrives<BR>set MyDrives = MyFileObject.Drives <BR> <BR>For each DiskDrive in MyDrives <BR> Response.Write ("Drive Letter : " & drive.DriveLetter)<BR> Response.Write ("Path : " & drive.Path)<BR> Response.Write ("File System : " & drive.FileSystem)<BR> Response.Write ("Total Size : " & drive.TotalSize)<BR>next<BR> <BR> set MyFileObject = nothing<BR> set Drives = nothing<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: FileSystemObject doesnt return mapped Network

    This&#039;ll get em listed, not sure about those properties though:<BR><BR>&#060;%<BR> Dim fs, d, dc, s, n<BR> Set fs = CreateObject("Scripting.FileSystemObject")<BR> Set dc = fs.Drives<BR> For Each d in dc<BR> n = n & d.DriveLetter & " - " <BR> If d.DriveType = Remote Then<BR> n = d.ShareName<BR> Else<BR> If d.IsReady Then<BR> n = n & d.Path & "<BR>"<BR> n = n & d.FileSystem & "<BR>"<BR> n = n & d.TotalSize & "<BR>"<BR> n = n & d.VolumeName & "<BR>"<BR> End If<BR> End If<BR> n = n & "<BR>----------" & vbCrLf<BR> Next<BR> Response.write n<BR>%&#062;

Posting Permissions

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