Getting Drives From Server

Results 1 to 2 of 2

Thread: Getting Drives From Server

  1. #1
    Join Date
    Dec 1969

    Default Getting Drives From Server

    I want to use the filesystemobject to get drive on a remote server...It&#039;s connected to the network...<BR><BR>Set fsFolderListSelect = Server.CreateObject("Scripting.FileSystemObject")< BR>Set fsFolderListDrive = fsFolderListSelect.GetDrive(tsDriveLetter)<BR>Set fsFolderListRoot = fsFolderListDrive.RootFolder<BR><BR>This code returns the subdirectories of D: on the webserver...Can I get the same info, say from D: on another server on the network...If so, how...???...<BR><BR>I&#039;ve looked in the faq&#039;s and found alot of stuff on getting drives off local machine, but not remote...<BR><BR>Thanks in advance...<BR><BR>Howie

  2. #2
    Join Date
    Dec 1969

    Default RE: Getting Drives From Server

    Got this from VBScript docs (need to use the remote machine&#039;s shared name)<BR>Function ShowFreeSpace(drvPath)<BR> Dim fso, d, s<BR> Set fso = CreateObject("Scripting.FileSystemObject")<BR> Set d = fso.GetDrive(fso.GetDriveName(drvPath))<BR> s = "Drive " & UCase(drvPath) & " - " <BR> s = s & d.VolumeName & "<BR>"<BR> s = s & "Free Space: " & FormatNumber(d.FreeSpace/1024, 0) <BR> s = s & " Kbytes"<BR> ShowFreeSpace = s<BR>End Function<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