@echo off setlocal enabledelayedexpansion set "LOG_DIR=%~dp0src-tauri" set "FOUND=0" if not exist "%LOG_DIR%" ( echo Log directory not found: "%LOG_DIR%" exit /b 1 ) for %%F in ("%LOG_DIR%\program.log*") do ( if exist "%%~fF" ( type nul > "%%~fF" echo Cleared: %%~nxF set "FOUND=1" ) ) if "%FOUND%"=="0" ( echo No matching log files found in "%LOG_DIR%". ) endlocal