title: VBScript to move file with wildcard, if it exists
body: <p>I am attempting to create a script that checks for the existence of archived eventlog files and, if any files exist, moves them to another folder. Running this script does nothing and gives no errors. I believe the wildcard in the If statement is what is giving me issues. I am new to vbscript, and scripting in general, and would appreciate some advice.</p>
  
  <pre><code>Set fso = CreateObject("Scripting.FileSystemObject")
  If (fso.FileExists("d:\eventlogs\Archive*.evtx")) Then
      FSO.CopyFile "d:\eventlogs\Archive*.evtx" , "d:\eventlogs\archive\"
      FSO.Deletefile "d:\eventlogs\archive*.evtx"
  End if
  </code></pre>