How to find and remove directories in windows batch command
The script will search for a given path and returns the name of folders found.
The script may remove the directory found (with or without prompt)
post this code
if exist %m_path% (
echo FOUND %m_path%
for /F %%i in ('dir obj /s /b') do (
echo "dir %%i"
REM Remove dir without prompt
rmdir %%i /s /q
REM Remove dir with prompt
REM rmdir %%i /s
If you want to be updated about similar snippets,
and follow our Channels