title: how to check if a file exists with vbscript
body: <p>I have a folder with many files. It looks like this  file1.txt, newFile1.txt, file2.txt, newFile2.txt, file3.txt, newFile3.txt, file4.txt, newFile4.txt, .... </p>
  
  <p>I have a code that generates the newFilei.txt . 
  I want to write a vbscript that checks if a newFile exists in this folder or not. 
  I tried this </p>
  
  <pre><code>Set objFolder = FSO.GetFolder("C:\myFolder\")
  
  For Each objFile In objFolder.Files 
          fileName=objFile.name 
      If instr(fileName,"newFile*") =1 Then
          WScript.Echo "new File exist"
      End If
  Next 
  </code></pre>
  
  <p>but this didnt work. any ideas ?</p>