cancel
Showing results for 
Search instead for 
Did you mean: 

Auto Delete History, Cache and Cookies

naga007
Level 3

Team,

Anyone developed a process to delete Browser history, cache and cookies?

Currently we are performing the activity manually to speed up browser. TIA.

 

1 REPLY 1

Hi @naga007 ,

In order to achieve this, you can create a batch file by opening Notepad application and entering the below code:

 

:: Close Chrome if it's running
taskkill /F /IM chrome.exe >nul 2>&1

:: Delete browsing data
rd /s /q "%LocalAppData%\Google\Chrome\User Data\Default\Cache"
rd /s /q "%LocalAppData%\Google\Chrome\User Data\Default\Cookies"
rd /s /q "%LocalAppData%\Google\Chrome\User Data\Default\History"

:: Close Edge if it's running
taskkill /F /IM msedge.exe >nul 2>&1

:: Delete browsing data
rd /s /q "%LocalAppData%\Microsoft\Edge\User Data\Default\Cache"
rd /s /q "%LocalAppData%\Microsoft\Edge\User Data\Default\Cookies"
rd /s /q "%LocalAppData%\Microsoft\Edge\User Data\Default\History"

 

 

Save this file as a .bat file as in my case, I have saved it as ClearBrowserData.bat:

devneetmohanty07_0-1719693730951.png

 

Now, in the Process Studio, you can use the Start Process action from Function for Utility - Environment - 10.1.1 business object and pass the batch file path as the parameter value for Application input argument:

devneetmohanty07_1-1719694017859.png

 

Once you run this flow, it should close both Chrome and Edge browsers and should also delete caches, cookies and history.

---------------------------------------------------------------------------------------------------------------------------------------

Hope this helps you out and if so, please mark the current thread as the 'Answer' so others can refer to the same for reference in future.

Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

 

 

 

 

 

---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.