From d55ace74f09210f2dc9d603c706ac43b19a2472c Mon Sep 17 00:00:00 2001 From: Ganesh Patil <7030871503ganeshpatil@gmail.com> Date: Wed, 18 Feb 2026 13:11:46 +0530 Subject: [PATCH] fix: make Windows destroy.bat call stop and clear before deletion (fixes #342) --- destroy.bat | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/destroy.bat b/destroy.bat index 561ec023..68b31a18 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. +