fillalph Posted November 19, 2005 Share Posted November 19, 2005 At the moment I am backing up my firefox and thunderbird profiles manually into a WinRAR SFX and then having it extracted during install.I know there are members on this forum that do use firefox and thunderbird, I was thinking of a good way to backup the profiles easily. the easiest way would probably be a batch.I took a look at the capabilities of rar.exe and noticed that you it can read in a comment file using the command line.My idea is this:The profiles are located in: %APPDATA%\\Thunderbird\*default\ and \Mozilla\Firefox\Profiles\*default (assuming we only want to backup the default profile).So if we change into that direct and store it as a variable and pass that along to rar.exe, we could archive into a sfx with a prewritten comment file. Once we have the backed up profiles move them over to replace the old ones on our UA cds/dvds. Then before every new UA version, we just run the batch file and presto, firefox and thunderbird profiles (bookmarks, extensions, mail, imap settings, etc.) all backed up.I suck at writing batch files. I am going to try, but if you want to beat me to it, I won't be sad .]Bonkers[ Link to comment Share on other sites More sharing options...
fillalph Posted November 19, 2005 Author Share Posted November 19, 2005 (edited) Alright. I got it working.EDIT!!! I split firefox and thunderbird into two files to update!The command file (firefox_backup.cmd)ECHO OFFECHO Backing up Firefox Profileset rar="%PROGRAMFILES%\WinRAR\RAR.exe"set temp=%CD%IF EXIST firefox_profile.exe del %CD%\firefox_profile.bakIF EXIST firefox_profile.exe rename %CD%\firefox_profile.exe firefox_profile.bakC:cd "%APPDATA%\Mozilla\Firefox\Profiles\*default"set firefox_dir=%CD%del /f /q "%firefox_dir%\cookies.txt"del /f /q "%firefox_dir%\Cache\*"%rar% a -z"%temp%\c_firefox.txt" -r -sfx firefox_profilemove "%firefox_dir%\firefox_profile.exe" "%temp%"EXITThe command file (thunderbird_backup.cmd)ECHO OFFECHO Backing up thunderbird Profileset rar="%PROGRAMFILES%\WinRAR\RAR.exe"set temp=%CD%IF EXIST thunderbird_profile.exe del %CD%\thunderbird_profile.bakIF EXIST thunderbird_profile.exe rename %CD%\thunderbird_profile.exe thunderbird_profile.bakC:cd "%APPDATA%\Thunderbird\*default"set thunderbird_dir=%CD%%rar% a -z"%temp%\c_thunderbird.txt" -r -sfx thunderbird_profilemove "%thunderbird_dir%\thunderbird_profile.exe" "%temp%"EXITnow you also need 2 text files that have your comments:c_thunderbird.txt;The comment below contains SFX script commandsPath=%PROGRAMFILES%\Mozilla Thunderbird\defaults\profileSavePathSilent=1Overwrite=1andc_firefox.txt;The comment below contains SFX script commandsPath=%PROGRAMFILES%\Mozilla Firefox\defaults\profileSavePathSilent=1Overwrite=1These two batches reside in the same folder as my firefox and thunderbird folders. I just run them right before making my new cd and I have updated profiles for both.Enjioy ]Bonkers[ Edited November 19, 2005 by ]Bonkers[ Link to comment Share on other sites More sharing options...
anick Posted November 19, 2005 Share Posted November 19, 2005 (edited) for bad english:Great...This is mine...CLS@ECHO OFFCOLOR 70MODE CON COLS=44 LINES=14set rar="%temp%\WinRAR\RAR.exe"cd "%APPDATA%\Mozilla\Firefox\Profiles\*default"set fxprofile_dir=%CD%del /f /q "%fxprofile_dir%\cookies.txt"del /f /q "%fxprofile_dir%\cookies-*.txt"del /f /q "%fxprofile_dir%\Cache\*"cd "%APPDATA%\Mozilla\Firefox\Profiles"set firefox_dir=%CD%%rar% a -k -z"%temp%\c_firefox.txt" -r -sfx BackupFirefoxmove "%firefox_dir%\BackupFirefox.exe" "%SystemDrive%\"RD /S /Q %Temp%\WinRARdel /S /Q "%temp%\c_firefox.txt"clsECHO ------------------------------------------ECHO Mozilla Firefox Profile Backup ProgramECHO ------------------------------------------ECHO.ECHO * Backuping Firefox profile...ECHO * Delete Cookies & Cache ...ECHO * Compressing profile...ECHO * Moving backup file to C:...ECHO.ECHO * Profile backup complete...ECHO.ECHO. Powed by anickECHO ------------------------------------------pauseEXITsee here Edited November 19, 2005 by anick Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now