/build/static/layout/Breadcrumb_cap_w.png

Read lines from file

Option Explicit

Dim oFSO, sFile, oFile, sText

Set oFSO = CreateObject("Scripting.FileSystemObject")

sFile = "Pingtest.txt"

If oFSO.FileExists(sFile) Then

Set oFile = oFSO.OpenTextFile(sFile, 1)

 Do While Not oFile.AtEndOfStream

  sText = oFile.ReadLine

   If Trim(sText) <> "" Then

    WScript.Echo sText

   End If

 Loop

oFile.Close

Else

WScript.Echo "The file was not there."

End If


Comments

This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ