Knowledge Base
v4.4.8
Search this version
Knowledge Base
Knowledge Base
Page
Code Steps
Category
Label
Link
Separator
Title
Message
Page icon
No icon. This page keeps the plain index row.
orSVG or PNG, square, at least 32×32.
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
Errors when starting In-Session Scan: The available space of Drive partition is low due to engines database
Copy Markdown
Open in ChatGPT
Open in Claude
Overview:
On a MetaDefender Drive, when running MetaDefender Drive In-Session Scan, there is a message says

In some cases, the root cause of it is because engines folder are taking up space, like in this screenshot, ESET database is occupying 2.94GB.

Solutions:
Create a .cmd file with following content
@echo off
setlocal EnableDelayedExpansion
rem ============================================================
rem Remove-DatabaseFolders.cmd
rem Recursively finds all folders named "database" under
rem .\CTR\engines and deletes them.
rem
rem Usage:
rem Remove-DatabaseFolders.cmd (asks for confirmation)
rem Remove-DatabaseFolders.cmd /y (no prompt)
rem Remove-DatabaseFolders.cmd /list (dry-run, list only)
rem Remove-DatabaseFolders.cmd "C:\other\root" (custom root)
rem Remove-DatabaseFolders.cmd "C:\other\root" /y (custom + no prompt)
rem ============================================================
set "ROOT=%~dp0CTR\engines"
set "AUTO=0"
set "LISTONLY=0"
:parseArgs
if "%~1"=="" goto afterArgs
if /I "%~1"=="/y" ( set "AUTO=1" & shift & goto parseArgs )
if /I "%~1"=="-y" ( set "AUTO=1" & shift & goto parseArgs )
if /I "%~1"=="/list" ( set "LISTONLY=1" & shift & goto parseArgs )
if /I "%~1"=="-list" ( set "LISTONLY=1" & shift & goto parseArgs )
if /I "%~1"=="/?" ( goto usage )
if /I "%~1"=="-h" ( goto usage )
if /I "%~1"=="--help" ( goto usage )
set "ROOT=%~1"
shift
goto parseArgs
:afterArgs
if not exist "%ROOT%" (
echo [ERROR] Root path not found: %ROOT%
exit /b 1
)
echo Searching under: %ROOT%
echo.
set "COUNT=0"
for /f "delims=" %%D in ('dir /s /b /ad "%ROOT%" 2^>nul ^| findstr /i /e "\\database"') do (
set /a COUNT+=1
set "F!COUNT!=%%D"
echo %%D
)
if "%COUNT%"=="0" (
echo No "database" folders found.
exit /b 0
)
echo.
echo Found %COUNT% "database" folder(s^).
if "%LISTONLY%"=="1" (
echo [List-only mode] No changes made.
exit /b 0
)
if "%AUTO%"=="0" (
set /p "ANSWER=Delete all listed folders? [y/N]: "
if /I not "!ANSWER!"=="y" (
echo Aborted.
exit /b 0
)
)
set "REMOVED=0"
set "FAILED=0"
for /l %%I in (1,1,%COUNT%) do (
set "TARGET=!F%%I!"
if exist "!TARGET!" (
rd /s /q "!TARGET!"
if exist "!TARGET!" (
echo [FAIL] !TARGET!
set /a FAILED+=1
) else (
echo [REMOVED] !TARGET!
set /a REMOVED+=1
)
)
)
echo.
echo Done. Removed: %REMOVED%, Failed: %FAILED%
exit /b 0
:usage
echo Usage:
echo %~nx0 - prompt before deleting under .\CTR\engines
echo %~nx0 /y - delete without prompting
echo %~nx0 /list - list matches only, do not delete
echo %~nx0 "C:\path" - use a custom root folder
echo %~nx0 "C:\path" /y - custom root, no prompt
exit /b 0
Copy the script to /MetaDefender Drive (disk-label):/tools then run the script from there

Say "y" (yes) when asked and your disk space is reclaimed.

Last updated on
Was this page helpful?
null
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message