title: Script to Move files one at a time and rename
body: <p>I have a requirement to move *.csv files from Europe to a server located in North America where a service is listening to process the files as they arrive.</p>
  
  <p>The issue I am having is on occasion the listener on the server will pick up the file as it being dropped and will attempt to process it and fail. </p>
  
  <p>What I have been advised to do is move the file as .txt then rename it immediately when it appears in the destination directory. This works fine but I now need to automate this process for many files. </p>
  
  <p>Note the listener service will also stop if too many files are renamed at once.</p>
  
  <p>In simple terms</p>
  
  <pre class="lang-none prettyprint-override"><code>For Each *.txt in Folder c:\Source
    Move from  C:\Source to \\ne-ifs-app\IN_FIELD_SERVICE\
    Rename \\ne-ifs-app\IN_FIELD_SERVICE\*.txt *.csv
  Repeat for next File
  </code></pre>