title: How to rename files and folders with Ant
body: <p>How to rename many files and folders with Ant? For files I know I can do it like this; <a href="https://stackoverflow.com/questions/4224995/how-to-rename-n-files-with-ant-batch-job">question</a>  </p>
  
  <p>How to do the same thing for folders?</p>
  
  <p>For e.g.
  Set of folders (Input)</p>
  
  <pre><code>com.google.appengine.eclipse.sdkbundle_1.5.2.r37v201107211953
  com.google.gdt.eclipse.designer.doc.user_2.3.2.r37x201107161328
  com.google.gdt.eclipse.designer.hosted.2_0.webkit_win32_2.3.2.r37x201107161253
  org.eclipse.acceleo.common_3.1.0.v20110607-0602.jar
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>com.google.appengine.eclipse.sdkbundle_1.5.2
  com.google.gdt.eclipse.designer.doc.user_2.3.2
  com.google.gdt.eclipse.designer.hosted.2_0.webkit_win32_2.3.2
  org.eclipse.acceleo.common_3.1.0.jar
  </code></pre>