title: copy certain file patterns to another folder
body: <p>Good afternoon, I wish to have a script that will look for all files with the name pattern LCP-??? and/or FSA-??? in c:\streetweeper and copy them to D:\java\temp\sz-files.
  This script will run on startup.</p>
  
  <p>I found a vbscript which has very similar functionality yet it uses a text file to read the files which need to be copied. can anyone help me transform this script to function as described above?</p>
  
  <p>thanks for your time, the script is below:</p>
  
  <pre><code>Option Explicit
  
  'The source path for the copy operation.
  Const strSourceFolder = "c:\streetweeper"
  
  'The target path for the copy operation.
  Const strTargetFolder = "D:\java\temp\sz-files"
  
  'The list of files to copy. Should be a text file with one file on each row. No paths -    just file name.
  Const strFileList = "C:\filelist.txt"
  
  'Should files be overwriten if they already exist? TRUE or FALSE.
  Const blnOverwrite = FALSE
  
  Dim objFSO
  Set objFSO = CreateObject("Scripting.FileSystemObject")
  
  Const ForReading = 1
  Dim objFileList
  Set objFileList = objFSO.OpenTextFile(strFileList, ForReading, False)
  
  Dim strFileToCopy, strSourceFilePath, strTargetFilePath
  On Error Resume Next
  Do Until objFileList.AtEndOfStream
  'Read next line from file list and build filepaths
  strFileToCopy = objFileList.Readline
  strSourceFilePath = objFSO.BuildPath(strSourceFolder, strFileToCopy)
  strTargetFilePath = objFSO.BuildPath(strTargetFolder, strFileToCopy)
  
  'Copy file to specified target folder.
  Err.Clear
  objFSO.CopyFile strSourceFilePath, strTargetFilePath, blnOverwrite
  If Err.Number = 0 Then
      'File copied successfully
  
  Else
      'Error copying file
      Wscript.Echo "Error " &amp; Err.Number &amp; " (" &amp; Err.Description &amp; "). Copying " &amp; strFileToCopy
  End If
  Loop
  </code></pre>