@echo off setlocal EnableExtensions set "TARGET=%LOCALAPPDATA%\Microsoft\Windows\INetCache" if not exist "%TARGET%\" ( echo Folder not found: %TARGET% exit /b 1 ) echo Cache files older than 7 days in %TARGET%: forfiles /p "%TARGET%" /s /m * /d -7 /c "cmd /c if @isdir==FALSE echo @path" 2>nul echo. set "ANSWER=" set /p ANSWER=Delete these cache files? Type Y to continue: if /i not "%ANSWER%"=="Y" ( echo Cancelled. Nothing deleted. exit /b 0 ) forfiles /p "%TARGET%" /s /m * /d -7 /c "cmd /c if @isdir==FALSE del /f /q @path" 2>nul echo Done. Some files may be in use and will remain. exit /b 0