The problem is two-fold. One error is mine.

On the If Open(... line, change the "1" at the end to a "0"
If Open(3, "C:\servers.TXT") = 0

This was a typo in my earlier example.

The other issue is - the code I posted simply corrected your logic, moving the process logic into the enumeration loop. I did not re-post the UDF part of the code.

Once you make the change to the Open statement and add the UDF back into your script, it should work - here's my results with the corrected script:
 Code:
Drv      Capacity           Free        <!>
appp04
C:   12001.65234375 7689.5
D:   34326.35546875 30163.34375
E:   13884.30078125 13699.015625
appp05
C:   12001.65234375 7838.58984375
D:   34326.35546875 30164.06640625
E:   13884.30078125 13699.015625
appp06
C:   12001.65234375 9424.59375
D:   5122.28515625 3048.03515625
E:   8762.01171875 8596.80078125
appp07
C:   12001.65234375 7225.30859375
D:   34326.35546875 30167.06640625
E:   13884.30078125 13697.4453125
appp08
C:   12001.65234375 8329.171875
D:   34326.35546875 30167.06640625
E:   13884.30078125 13699.01171875


Considering the large decimals, you'll prolly want to wrap the CDbl(....) in an Int() function, like this -
Right(' ' + Int(CDbl($D_Capacities[$Index]) / 1048576.0), 15)
Right(' ' + Int(CDbl($D_FreeSpace[$Index]) / 1048576.0), 15)

Glenn
_________________________
Actually I am a Rocket Scientist! \:D