title: Modifying multiple text files with VBScript
body: <p>i need help with this VBScript<br>
  What I'm trying to do here is modify the logfile to remove the extra spaces inside. (I just got this script actually somewhere on the net.)<br>
  It works if i specify just a single file but I'm trying to modify multiple files. Using the wildcard character as i did below did not work either (sorry I'm not so good with vbs)  </p>
  
  <p>Also does anyone know how we can do this without creating a new output file? just modify the original file. Thanks in advance..</p>
  
  <pre><code>Set objFSO = CreateObject("Scripting.FileSystemObject") 
  'change this line to wherever you want to read the input from.
  Set objTextFile = objFSO.OpenTextFile("D:\access*.log",1) 
  Set objNewFile = objFSO.CreateTextFile("D:\access*_new.log")
  Do Until objTextFile.AtEndOfStream
  
  myString = objTextFile.Readline
  objNewFile.WriteLine(Replace (myString, " ", " "))
  Loop
  </code></pre>