Jump to content

Search the Community

Showing results for tags 'firefox backup'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi guys, needed something to speed up the backup of the firefox profile, so i did this, works for me just right, and it's here available to anyone who needs it. Obviously gotta thank to everyone who helped me, and had so much patience to help out. Thumbs up for Melba23! This works like this: press backup, it searches for the file extensions.ini in a subfolder of all fixed drives PROGS01 INSTALL If not found, backs it up to 'C:FFProfBackup' The restore function is similar, searches for the same file in the same manner, not found, searches for 'C:FFProfBackup', if found uses that, not found any, won't do anything. Uses a method of deleting the destination dir, and copying the source on it, So use at your risk. Don't blame me if your pc caught fire, or got infested with cockroaches. hehe PS: Uses Melba23 UDF RecFileListToArray that you can get #region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=ResourcesFox.ico #AutoIt3Wrapper_Res_Icon_Add=ResourcesFox.ico #AutoIt3Wrapper_Run_Tidy=n #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Array.au3> #include <GuiListView.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ListViewConstants.au3> #include <RecFileListToArray.au3> Opt("GUIOnEventMode", 1) Opt("TrayAutoPause", 0) Opt("TrayIconDebug", 1) $Form1 = GUICreate("Firefox Profile Backup", 600, 300, 190, 125) GUISetOnEvent($GUI_EVENT_CLOSE, "Close") $Backup = GUICtrlCreateButton("Backup", 10, 265, 75, 25) GUICtrlSetOnEvent($Backup, "Backup") $Restore = GUICtrlCreateButton("Restore", 120, 265, 75, 25) GUICtrlSetOnEvent($Restore, "Restore") $Exit = GUICtrlCreateButton("Exit", 230, 265, 75, 25) GUICtrlSetOnEvent($Exit, "Close") $cListView = GUICtrlCreateListView("Path", 10, 80, 580, 130) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 575) $Label1 = GUICtrlCreateLabel("Profile Folder", 10, 10, 130, 17) $Label2 = GUICtrlCreateLabel("Backup/Restore Folder(s) List", 10, 60, 200, 17) $Label2 = GUICtrlCreateLabel("Backup/Restore Relative Folder", 10, 220, 200, 17) $Input1 = GUICtrlCreateInput(@AppDataDir & 'MozillaFirefox', 10, 30, 580, 21) $Input2 = GUICtrlCreateInput('PROGS', 10, 240, 580, 21) $ProfileDir = GUICtrlRead($Input1) $DestDir = GUICtrlRead($Input2) ;$DefaultBackup = ('C:FFProfBackup') $aArray = DriveGetDrive('FIXED') If @error Then MsgBox(4096, "DriveGetDrive", "It appears an error occurred.") Else For $i = 1 To $aArray[0] $aList = _RecFileListToArray(StringUpper($aArray[$i]) & $DestDir, "extensions.ini", 1, 1, 0, 2) If IsArray($aList) Then For $u = 1 To $aList[0] GUICtrlCreateListViewItem($aList[$u], $cListView) Next EndIf Next EndIf GUISetState(@SW_SHOW) Func Backup() $ProfileDir = GUICtrlRead($Input1) $DestDir = GUICtrlRead($Input2) If FileExists(@AppDataDir & 'MozillaFirefoxProfilesdefault.defaultextensions.ini') Then _GUICtrlListView_DeleteAllItems($cListView) ProgressOn("Progress...", "Working", "") $aArray = DriveGetDrive('FIXED') If @error Then MsgBox(4096, "DriveGetDrive", "It appears an error occurred.") Else For $i = 1 To $aArray[0] $aList = _RecFileListToArray(StringUpper($aArray[$i]) & $DestDir, "extensions.ini", 1, 1, 0, 2) If IsArray($aList) Then For $u = 1 To $aList[0] GUICtrlCreateListViewItem($aList[$u], $cListView) DirRemove(StringTrimRight($aList[$u], 40), 1) Sleep(3000) DirCopy(@AppDataDir & 'MozillaFirefox', StringTrimRight($aList[$u], 40), 1) If FileExists($aList[$u]) Then MsgBox(4096, 'Success!', 'Files copied successfully From: ' & $ProfileDir & ' >>> to >>> ' & (StringTrimRight($aList[$u], 40))) EndIf ProgressSet(50, "50 %", "Working") Next Else MsgBox(4096, "Info", "No Backup found in subdirectories: " & StringUpper($aArray[$i]) & $DestDir) ;DirCopy($ProfileDir, $DefaultBackup, 1) DirCopy($ProfileDir, StringUpper($aArray[$i]) & $DestDir, 1) ;MsgBox(4096, "Info", 'Backup done in: ' & $DefaultBackup & ' >>> And >>> ' & StringUpper($aArray[$i]) & $DestDir) MsgBox(4096, "Info", 'Backup done in: ' & StringUpper($aArray[$i]) & $DestDir) EndIf Next EndIf ProgressSet(100, "100 %", "Done!") Sleep(1000) ProgressOff() Else MsgBox(4096, "Info", "No Profile in: " & $ProfileDir) EndIf EndFunc ;==>Backup Func Restore() $ProfileDir = GUICtrlRead($Input1) $DestDir = GUICtrlRead($Input2) _GUICtrlListView_DeleteAllItems($cListView) ProgressOn("Progress...", "Working", "") $aArray = DriveGetDrive('FIXED') If @error Then MsgBox(4096, "DriveGetDrive", "It appears an error occurred.") Else ProgressSet(50, "50 %", "Working") For $i = 1 To $aArray[0] $aList = _RecFileListToArray(StringUpper($aArray[$i]) & $DestDir, "extensions.ini", 1, 1, 0, 2) If IsArray($aList) Then For $u = 1 To $aList[0] GUICtrlCreateListViewItem($aList[$u], $cListView) DirRemove($ProfileDir, 1) Sleep(2000) DirCopy(StringTrimRight($aList[$u], 40), $ProfileDir, 1) ProgressSet(75, "75 %", "Working") If FileExists(@AppDataDir & 'MozillaFirefoxProfilesdefault.defaultextensions.ini') Then MsgBox(4096, 'Success!', 'Files copied successfully From: ' & (StringTrimRight($aList[$u], 40)) & ' >>> to >>> ' & $ProfileDir) Else MsgBox(4096, "Info", "No Profile in: " & $ProfileDir) EndIf Next Else MsgBox(4096, "Info", "No Backup found in subdirectories: " & StringUpper($aArray[$i]) & $DestDir) ;If FileExists($DefaultBackup & 'Profilesdefault.defaultextensions.ini') Then ;DirCopy($DefaultBackup, $ProfileDir, 1) ;MsgBox(4096, "Info", 'Backup copied from: ' & $DefaultBackup) ;EndIf If FileExists(StringUpper($aArray[$i]) & $DestDir & 'Profilesdefault.defaultextensions.ini') Then DirCopy(StringUpper($aArray[$i]) & $DestDir, $ProfileDir, 1) MsgBox(4096, "Info", 'Backup copied from: ' & StringUpper($aArray[$i]) & $DestDir) EndIf EndIf Next EndIf ProgressSet(100, "100 %", "Done!") Sleep(1000) ProgressOff() EndFunc ;==>Restore Func Close() Exit EndFunc ;==>Close Do Sleep(100) Until $Form1 = 0 Update 1 includes: 1 - input1 is now readable, change path if different 2 - added input2 to set the relative path to save/restore the backup 3 - Removed/commented defaultpath, meaning it no longer saves to C:FFProfBackup, when there's no destination folder set, instead saves to the relative path you wrote. 4 - Included the udf required, icon, and compiled script Download careca.googlecode.com
×
×
  • Create New...