title: Batch script for copying files with folder
body: <p>I have list of files path in <code>rarme.txt</code> file.
  such as:</p>
  
  <ul>
  <li>D:\Test\Bin\test.dll       </li>
  <li>D:\Test\Bin\test.exe           </li>
  <li>D:\Test\Image\House\Door.bmp        </li>
  <li>D:\Beta\AppHouse.dll</li>
  </ul>
  
  <p>Now how to copy the files with only one or two level up folder </p>
  
  <p>for ex: In case of </p>
  
  <blockquote>
    <p>D:\Test\Bin\test.dll</p>
  </blockquote>
  
  <p>How to copy <code>test.dll</code> file within <code>Bin</code> folder?</p>
  
  <p>and in case of </p>
  
  <blockquote>
    <p>D:\Test\Image\House\Door.bmp</p>
  </blockquote>
  
  <p>how to copy <code>door.bmp</code> within <code>Image\House Folder</code>?</p>
  
  <p>This bat script copies the file to location <code>D:\ForPatch</code> and rars it</p>
  
  <pre><code>Rem Copying files to folder
  pause
  for /f "tokens=*" %%i in (rarme.txt) do xcopy "%%i" "D:\ForPatch" /s
  pause
  cd D:\ForPatch
  pause
  rar a  -ep1 -r Patch.rar *.*
  pause
  </code></pre>