title: Batch file to delete specific files in multiple folders
body: <p>I need to delete specific files from 28 folders on the same server.
  e.g</p>
  <p>C:/folder/DMP/app_x0</p>
  <p>C:/folder/DMP/app_x1</p>
  <p>C:/folder/DMP/app_x2</p>
  <p>DeleteList.txt has a list of files names (with path).</p>
  <p>C:/folder/DMP/app_x0/ABC1.txt</p>
  <p>C:/folder/DMP/app_x0/ABC1.doc</p>
  <p>The batch file needs to have a loop to go through each folder one by one and delete all files mentioned in a text file. Following worked ok for one folder only if I specify the full path before each file's names in  DeleteList.txt file.</p>
  <pre><code>for /f &quot;delims=&quot; %%f in (DeleteList.txt) do del &quot;%%f&quot;
  </code></pre>
  <p>How to use above so that same code could run 28 times in batch file but each time replaces folder location path. DeleteList.txt will not change.</p>
  <p>Any sample code/suggestion would help.
  Thx.</p>