title: File gets made but no script in file
body: <p>I have coded the following script out in hopes of the script obtaining information from files in a folder, and summarizing them into a newly made file. When I try to run this script, I get Error (code: 800A1A8, line: 53) "Object required: 'objReadFiles'", but when I insert 'objReadFiles' above line 53, I get an error saying "Type mismatch: 'objReadFiles'" (code: 800A000D). The new file also contains no content.</p>
  
  <pre><code>'Create new output file
  Set objFile = objFSO.CreateTextFile("M:\vbscripts\folder\TEST RUN\Summary.txt")
  
  
  'Read through folder
  Set objFolder = objFSO.GetFolder("M:\vbscripts\folder\TEST RUN\COMP")
  Set colFiles = objFolder.Files 
  
  
  'Get information and write it in file
  For Each objFiles in colFiles
      strName = objFiles.Name
      num = len(strName) - 13
      string_part = left(strName, num)
      datetime = CDATE(objReadFiles.DateLastModified)
      Do While objReadFile.AtEndOfStream &lt;&gt; True
          contents = objReadFile.ReadLine
          If Not InStr(contents, "INSTALLED SOFTWARE") &gt; 0 AND InStr(contents, " ") &gt; 0 then
              objFile.Write string_part &amp; "," &amp; datetime &amp; "," &amp; contents &amp; vbCRLF
          End If
      Loop
  Next 
  
  
  'Write result into new output file
  objFile.Write "end of file"
  </code></pre>