Sign in to follow this  
Followers 0
am632

firefox script nrly finished

6 posts in this topic

#1 ·  Posted (edited)

hi,

i have nearly finished my firefox script but got 1 last problem

Here is the script - see if anyone knows how 2 help

;Clear Profile

DirRemove(@HomeDrive & "\Users\" & @UserName & "\AppData\Local\Mozilla\Firefox\Profiles\", 1)

DirCreate(@HomeDrive & "\Users\" & @UserName & "\AppData\Local\Mozilla\Firefox\Profiles\")

; Form History & Downloads & cookies & search

FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\???????\formhistory.sqlite")

FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\???????\cookies.sqlite")

FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\???????\search.sqlite")

(I know you can just go ryt to the temp directory but it wouldnt work for some reason)

the problem is the directory is different for all computers where i put the question marks, how can i get it to go to the directory what ever it says, looked in to the search function but im struggling

any ideas please

tnx

Edited by am632

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

hi,

i have nearly finished my firefox script but got 1 last problem

Here is the script - see if anyone knows how 2 help

;Clear Profile

DirRemove(@HomeDrive & "\Users\" & @UserName & "\AppData\Local\Mozilla\Firefox\Profiles\", 1)

DirCreate(@HomeDrive & "\Users\" & @UserName & "\AppData\Local\Mozilla\Firefox\Profiles\")

; Form History & Downloads & cookies & search

FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\???????\formhistory.sqlite")

FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\???????\cookies.sqlite")

FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\???????\search.sqlite")

(I know you can just go ryt to the temp directory but it wouldnt work for some reason)

the problem is the directory is different for all computers where i put the question marks, how can i get it to go to the directory what ever it says, looked in to the search function but im struggling

any ideas please

tnx

Use the _FileListToArray function:

#Include <File.au3>

$Path = @HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\"
$Folders = _FileListToArray($Path,"*",2)
$Loop = UBound($Folders)

For $i = 1 to $Loop
FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\" & $Folders[$i] & "\formhistory.sqlite")

FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\" & $Folders[$i] & "\cookies.sqlite")

FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\" & $Folders[$i] & "\search.sqlite")
next
Edited by Emolas

Share this post


Link to post
Share on other sites

Hi, thanks for the help, the script works nicely and does the job but i get an error when i run it (although it still works), how can i stop the error popping up please?

I have attached a screenshot of the error

thanks

post-49753-12534598748707_thumb.jpg

Share this post


Link to post
Share on other sites

Perfect, Thanks Guys

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  
Followers 0