Jump to content

firefox script nrly finished


am632
 Share

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...