Jump to content
Sign in to follow this  
Xavier59

Clean cache and cookies [ CHROME ]

Recommended Posts

Xavier59

Hi !

I search a script for clean cache and cookies on chrome :')

Have you already see that ?

Thanx.

Share this post


Link to post
Share on other sites
Xavier59

I search 

Hi,

  I haven't seen one...

 

....why don't you build one so we all can use it?

Thanks,

Bill

 

I try I try, but i started autoit only 2 month ago so it's difficult for me :)

First, i try to find where chrome cookie are stocked ...

Share this post


Link to post
Share on other sites
Xavier59

So.

I find where are the cookies :

C:UsersAppDataLocalGoogleChromeUser DataProfile 2Coookies.

If i delete this file, is it good ?

I will test it.

Share this post


Link to post
Share on other sites
Xavier59

So.

I find where are the cookies :

C:UsersAppDataLocalGoogleChromeUser DataProfile 2Coookies.

If i delete this file, is it good ?

I will test it.

 

I found the solution.

Now, i make a simple script to delete that.

After that, i just share it.

Thanx

Share this post


Link to post
Share on other sites
Xavier59

I don't understand ....

I did that : 

FileDelete(@ScriptDir & "\Profil 2\Cache")

And that don't work, the file wasn't delete.

( Full path = C:UsersXavierAppDataLocalGoogleChromeUser DataProfile 2Cache )

So ... Why ?

Share this post


Link to post
Share on other sites
l3ill

Scriptdir is where your script is located

for testing try using the full path to the file first.

BTW File Delete only deletes files...

cache is a folder

Use:

DirRemove($dPath_Cache, 1)

But your on the right path, keep trying.

Edited by billo

Share this post


Link to post
Share on other sites
Xavier59

Pff i search since 30 minutes and i don't find how to do.

Cause, how can i do for find the path of a folder if i can't use @ScriptDir :/

Share this post


Link to post
Share on other sites
l3ill

$dPath = (" C:\Users\Xavier\AppData\Local\Google\Chrome\User Data\Profile 2\")
$dPath_Cache = (" C:\Users\Xavier\AppData\Local\Google\Chrome\User Data\Profile 2\Cache")

; "Profile 2" is normally "Default" so you have more than 1 profile you'll have to add them.

FileDelete($dPath & "\" & "Cookies")
FileDelete($dPath & "\" & "Cookies-journal")
FileDelete($dPath & "\" & "Current Session")
FileDelete($dPath & "\" & "History")
FileDelete($dPath & "\" & "History-journal")

DirRemove($dPath_Cache, 1)

Share this post


Link to post
Share on other sites
Xavier59
$dPath = (" C:\Users\Xavier\AppData\Local\Google\Chrome\User Data\Profile 2\")
$dPath_Cache = (" C:\Users\Xavier\AppData\Local\Google\Chrome\User Data\Profile 2\Cache")

; "Profile 2" is normally "Default" so you have more than 1 profile you'll have to add them.

FileDelete($dPath & "\" & "Cookies")
FileDelete($dPath & "\" & "Cookies-journal")
FileDelete($dPath & "\" & "Current Session")
FileDelete($dPath & "\" & "History")
FileDelete($dPath & "\" & "History-journal")

DirRemove($dPath_Cache, 1)

I know to do that.

Just, i want my script can be execute and another computer, and then, the folder couldn't be the same ^^

Share this post


Link to post
Share on other sites
Xavier59

Oh ok !

That's why i searched

Thanx.

Share this post


Link to post
Share on other sites
l3ill

@AppData doesn't work for me.

This one should work on other pc's that are using their default profile:

$dPath = (@UserProfileDir & "\AppData\Local\Google\Chrome\User Data\Default\")
$dPath_Cache = (@UserProfileDir & "\AppData\Local\Google\Chrome\User Data\Default\Cache")

FileDelete($dPath & "\" & "Cookies")
FileDelete($dPath & "\" & "Cookies-journal")
FileDelete($dPath & "\" & "Current Session")
FileDelete($dPath & "\" & "History")
FileDelete($dPath & "\" & "History-journal")

DirRemove($dPath_Cache, 1)

Share this post


Link to post
Share on other sites
Xavier59

I tryed that but don't work :

DirRemove(@AppdataDir & "Profile 2Cache")

Share this post


Link to post
Share on other sites
Xavier59

 

@AppData doesn't work for me.

This one should work on other pc's that are using their default profile:

$dPath = (@UserProfileDir & "\AppData\Local\Google\Chrome\User Data\Default\")
$dPath_Cache = (@UserProfileDir & "\AppData\Local\Google\Chrome\User Data\Default\Cache")

FileDelete($dPath & "\" & "Cookies")
FileDelete($dPath & "\" & "Cookies-journal")
FileDelete($dPath & "\" & "Current Session")
FileDelete($dPath & "\" & "History")
FileDelete($dPath & "\" & "History-journal")

DirRemove($dPath_Cache, 1)

Ok thanx !! 

Share this post


Link to post
Share on other sites
l3ill

Just FYI,

  @AppDataDir will only get you as far as your AppData Folder.

any folder after that will have to be added manually.

so for you it would be:

@AppDataDir & "\Local\Google\Chrome\User Data\Profile 2"

as opposed to this - Full path 

C:\Users\AppData\Local\Google\Chrome\User Data\Profile 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×