Using FileIO():
 Code:
$aTargets = FileIO('.\Filename.txt', 'R')
For Each $Host in $aTargets
  ; run code to query each $Host value
  If Ping($Host)
    $HostPath = '\\' + $Host + 'C$\path_to_query'
    'Processing ' $HostPath ? ; for debugging or status reporting

    ; run any necessary command using $HostPath to reference the target path

  EndIf
Next
Also, the file should be a list of hostnames only - no paths or slashes since that never changes. This is illustrated above. It allows you to use the Ping UDF to make sure the system is alive before attempting to make queries.

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