@echo clean DebugReport del /q /s /f \\%FILE_SERVER%\shares\DebugReport\*.* ping 127.0.0.1 -n 30 >nul for /f "delims=" %%a in ('dir /s /b /ad "\\%FILE_SERVER%\shares\DebugReport"') do (rd /q "%%a" 2>nul && echo Deleted "%%a") ping 127.0.0.1 -n 10 >nul exit 0