(view source code of ffxcac.bat as plain text)
@ECHO OFF
IF NOT "%OS%"=="Windows_NT" GOTO Syntax
SETLOCAL
IF NOT "%~1"=="" GOTO Syntax
TASKLIST.EXE /? >NUL 2>&1
IF NOT ERRORLEVEL 1 (
TASKLIST.EXE /FI "imagename eq firefox.exe" 2>NUL | FIND /I "firefox.exe" >NUL
IF NOT ERRORLEVEL 1 (
ECHO.
ECHO Firefox is still active in memory.
ECHO Please close Firefox and try again.
GOTO Syntax
)
)
FOR /D %%A IN ("%UserProfile%.\..\*.*") DO (
IF EXIST "%%~fA\Local Settings\Application Data\Mozilla\Firefox\Profiles\" (
FOR /D %%B IN ("%%~fA\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.*") DO (
FOR %%C IN (Cache Cache.Trash OfflineCache) DO (
PUSHD "%%~fB\%%~C" 2>NUL
FOR /F "tokens=*" %%D IN ('CD') DO (
IF /I "%%~D"=="%%~fB\%%~C" RD /Q /S "%%~fB\%%~C" 2>NUL
)
POPD
)
)
)
)
ENDLOCAL
GOTO:EOF
:Syntax
ECHO.
ECHO FfxCAC.bat, Version 1.10 for Windows XP and later
ECHO Flush the Firefox cache directories in ALL local profiles
ECHO.
ECHO Usage: FFXCAC
ECHO.
ECHO Note: This batch file can't clear the current user's cache if Firefox is
ECHO running. In Windows XP, it will check if Firefox is active and abort
ECHO if so. In older Windows versions, this condition will generate errors.
ECHO.
ECHO Written by Rob van der Woude
ECHO http://www.robvanderwoude.com
IF "%OS%"=="Windows_NT" ENDLOCAL
page last modified: 2024-04-16; loaded in 0.0074 seconds