diff --git a/destroy.bat b/destroy.bat index 561ec02..68b31a1 100644 --- a/destroy.bat +++ b/destroy.bat @@ -1,3 +1,25 @@ -@echo off -if exist "%1\stop.bat" (rmdir /s/q %1) else (echo "%1 is not a concore study") - +@echo off + +if not exist "%1" ( + echo "%1 does not exist" + exit /b 1 +) + +if not exist "%1\stop.bat" ( + echo "%1 is not a concore study" + exit /b 1 +) + +echo Stopping study... +call "%1\stop.bat" + +if exist "%1\clear.bat" ( + echo Clearing study... + call "%1\clear.bat" +) + +echo Removing study directory... +rmdir /s /q "%1" + +echo Done. +