@echo off setlocal EnableExtensions set "OUTDIR=%~dp0reports" set "OUT=%OUTDIR%\font-list.txt" if not exist "%OUTDIR%" mkdir "%OUTDIR%" echo Font files > "%OUT%" echo Folder: %SystemRoot%\Fonts >> "%OUT%" echo Generated: %DATE% %TIME% >> "%OUT%" echo. >> "%OUT%" dir "%SystemRoot%\Fonts" /b /o:n >> "%OUT%" 2>&1 for /f %%C in ('dir "%SystemRoot%\Fonts" /b /a-d 2^>nul ^| find /c /v ""') do ( echo Font files: %%C echo Font files: %%C >> "%OUT%" ) echo Report saved to "%OUT%" echo Fonts were only listed, nothing was installed or removed. exit /b 0