Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
553 views
in Technique[技术] by (71.8m points)

internet explorer - clear cache of browser by command line

I am working in media domain. I need to check every change in all leading browsers i.e. IE, Firefox, Chrome, Safari and Opera.

To clear cache, every time i need to use Ctrl + Shift + del.

Is there any another way to clear the cache of every web browser using command line?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Here is how to clear all trash & caches (without other private data in browsers) by a command line. This is a command line batch script that takes care of all trash (as of April 2014):

erase "%TEMP%*.*" /f /s /q
for /D %%i in ("%TEMP%*") do RD /S /Q "%%i"

erase "%TMP%*.*" /f /s /q
for /D %%i in ("%TMP%*") do RD /S /Q "%%i"

erase "%ALLUSERSPROFILE%TEMP*.*" /f /s /q
for /D %%i in ("%ALLUSERSPROFILE%TEMP*") do RD /S /Q "%%i"

erase "%SystemRoot%TEMP*.*" /f /s /q
for /D %%i in ("%SystemRoot%TEMP*") do RD /S /Q "%%i"


@rem Clear IE cache -  (Deletes Temporary Internet Files Only)
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
erase "%LOCALAPPDATA%MicrosoftWindowsTempor~1*.*" /f /s /q
for /D %%i in ("%LOCALAPPDATA%MicrosoftWindowsTempor~1*") do RD /S /Q "%%i"

@rem Clear Google Chrome cache
erase "%LOCALAPPDATA%GoogleChromeUser Data*.*" /f /s /q
for /D %%i in ("%LOCALAPPDATA%GoogleChromeUser Data*") do RD /S /Q "%%i"


@rem Clear Firefox cache
erase "%LOCALAPPDATA%MozillaFirefoxProfiles*.*" /f /s /q
for /D %%i in ("%LOCALAPPDATA%MozillaFirefoxProfiles*") do RD /S /Q "%%i"

pause

I am pretty sure it will run for some time when you first run it :) Enjoy!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...