title: Bat script to find and replace files in multiple subfolders - replace .java files with .class files from specific folder
body: <p>I am new to windows batch scripting .. please help on this scenario</p>
  
  <p>I have file structures as below ::</p>
  
  <p><strong>dir1</strong>:
  c:\workspace\changeset\com\folder</p>
  
  <p><strong>subfolder1</strong></p>
  
  <ul>
  <li>one.java</li>
  </ul>
  
  <p><strong>subfolder-2</strong></p>
  
  <ul>
  <li>two.java</li>
  </ul>
  
  <p><strong>dir2</strong>:
  c:\workspace\target\class\com\folder</p>
  
  <p><strong>subfolder1</strong></p>
  
  <ul>
  <li>one.class</li>
  </ul>
  
  <p><strong>subfolder2</strong></p>
  
  <ul>
  <li>two.class</li>
  </ul>
  
  <p><strong>Subfolder3</strong></p>
  
  <ul>
  <li>three.class</li>
  </ul>
  
  <p>Need to find and replace  <strong>dir1</strong> files in respective subfolders i.e one.java and two.java from <strong>dir2</strong> files i.e one.class and two.class ( need to replace certain .java files with .class files from specific folder ) </p>
  
  <p>much appreciated for your help.</p>
  
  <p>Thanks 
  Arjun</p>