HEELPBOOK - VBScript - How to read .txt file for input ######################### SCENARIO (Typical) ############# I'm having a bit of an issue, I have a text file with computer names in it and I am trying to read in each line and then perform a ping... SOLUTION ############## Option Explicit Dim oFSO, sFile, oFile, sText Set oFSO = CreateObject("Scripting.FileSystemObject") sFile = "your text file" 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 ############ ARTICLE INFO ############# Article Month: August Article Date: 02/08/2012 Permalink: http://heelpbook.altervista.org/2012/vbscript-how-to-read-txt-file-for-input/ Source: http://www.visualbasicscript.com/Vbscript-to-read-txt-file-for-input-m31649.aspx Language: English View more articles on: http://www.heelpbook.net/ Follow us on Facebook: http://it-it.facebook.com/pages/HeelpBook/100790870008832 Follow us on Twitter: https://twitter.com/#!/HeelpBook Follow us on RSS Feed: http://feeds.feedburner.com/Heelpbook Follow us on Delicious: http://delicious.com/heelpbook Linkedin: http://it.linkedin.com/pub/stefano-maggi/27/73a/b20