@Echo off
:DelDir
REM #Doc 02.02.2015/J.Fes Delete all files (recursive) in %Dir_to_Clean_DP%
setlocal
  set Dir_to_Clean_DP=%~1
  if "%Dir_to_Clean_DP%" equ "" goto :MyEnd
  Echo Delete all in dir........: %Dir_to_Clean_DP%
  del /s /q "%Dir_to_Clean_DP%" 1>NUL 2>NUL

  REM Determine the items left and try to delete any subdirs
  for /f "delims=#" %%i in ('dir /a:d /b %Dir_to_Clean_DP%') DO (
  Echo Delete SUB Dir[s]........: %Dir_to_Clean_DP%\%%i
   rd /s /q %Dir_to_Clean_DP%\"%%i" 1>NUL 2>NUL
  )
  Echo Delete all in dir........: %Dir_to_Clean_DP%  !!DONE
:MyEnd
endlocal
goto :eof
