title: search and delete specific search term folder continuously
body: <p>Need help to write a batch file to search c drive and delete all folders and subdirectories that has the word 'text' anywhere in the folder name, which would be running continuously, whenever it finds a folder with that word..
  such as if a folder anywhere on the C: is called 'text' or another called '1text2' or 'ninety text documents' it would delete all 3 folders, as they contain the word 'text'</p>
  
  <p>I have got the following, but it only deletes 1 folder and does not detect a folder with the word 'text' anywhere in the folder name:</p>
  
  <pre><code>@echo off
  for /d /r "c:\" %%a in (*) do if /i "%%~nxa"=="text" set "folderpath=%%a"
  rmdir /s /q "%folderpath%"
  </code></pre>
  
  <p>Any help is greatly appreciated</p>