title: How to remove a folder with a batch file?
body: <p>If I build with Turbostudio a portable and use it later, there are two folders created on host that should be removed with a batch file. These are the two folders:</p>
  
  <pre><code>C:\Users\XXXXX\AppData\Local\Turbo.net
  C:\Users\XXXXX\AppData\Local\Temp\SPOON
  </code></pre>
  
  <p>In <code>SPOON</code> is created additionally the subfolder <code>CACHE</code>.</p>
  
  <p>I found a code from <strong>matt</strong> that is working on temp folder:</p>
  
  <pre><code>@echo off
  :: BatchGotAdmin (Run as Admin code starts)
  
  REM --&amp;gt; Check for permissions
  &amp;gt;nul 2&amp;gt;&amp;amp;1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  
  REM --&amp;gt; If error flag set, we do not have admin.
  if '%errorlevel%' NEQ '0' (
  echo Requesting administrative privileges...
  goto UACPrompt
  ) else ( goto gotAdmin )
  
  :UACPrompt
  echo Set UAC = CreateObject^("Shell.Application"^) &amp;gt; "%temp%\getadmin.vbs"
  echo UAC.ShellExecute "%~s0", "", "", "runas", 1 &amp;gt;&amp;gt; "%temp%\getadmin.vbs"
  
  "%temp%\getadmin.vbs"
  exit /B
  
  :gotAdmin
  if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
  pushd "%CD%"
  CD /D "%~dp0"
  
  :: BatchGotAdmin (Run as Admin code ends)
  :: Your codes should start from the following line
  @echo off
  cd %temp%
  rd /S /Q %temp%
  </code></pre>
  
  <p>But how I can remove the <code>Turbo.net</code> folder in <code>Local</code>?</p>