From 990a5b5d47251aae9504caef012b2c5b4db80154 Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Mon, 14 Mar 2022 20:03:30 +0100 Subject: [PATCH] Initial commit --- README.md | 12 ++++++++++++ firefox-load.bat | 18 ++++++++++++++++++ firefox-save.bat | 18 ++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 README.md create mode 100644 firefox-load.bat create mode 100644 firefox-save.bat diff --git a/README.md b/README.md new file mode 100644 index 0000000..5363f11 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# Firefox profile archiving (Windows) + +Scripts permitting to save/restore Firefox profile to/from a defined location. + +### Requirements +* [7-Zip](https://www.7-zip.org/) + +### Files +* `firefox-save.bat` performs a save of you Firefox profile. +* `firefox-load.bat` restores a save of you Firefox profile. + +### TODO diff --git a/firefox-load.bat b/firefox-load.bat new file mode 100644 index 0000000..7a65aa1 --- /dev/null +++ b/firefox-load.bat @@ -0,0 +1,18 @@ +:: The purpose of this script is to download and install a Firefox profile. + +:: Set parameters here +set file_name=profile.zip +set save_path=Y:\path\to\firefox-profile +set sevenz_exe="C:\Program Files\7-Zip\7z.exe" +set firefox_data_path=C:\Users\USER\AppData\Roaming\Mozilla\Firefox\Profiles +set profile_name=profile + +:: Main process + +:: Remove current profile +rd /S /Q %firefox_data_path%\%profile_name% + +:: Install profile +%sevenz_exe% x %save_path%\%file_name% -o%firefox_data_path% + +exit diff --git a/firefox-save.bat b/firefox-save.bat new file mode 100644 index 0000000..6ce234e --- /dev/null +++ b/firefox-save.bat @@ -0,0 +1,18 @@ +:: The purpose of this script is to zip and upload a Firefox profile. + +:: Set parameters here +set file_name=profile.zip +set save_path=Y:\path\to\firefox-profile +set sevenz_exe="C:\Program Files\7-Zip\7z.exe" +set firefox_data_path=C:\Users\USER\AppData\Roaming\Mozilla\Firefox\Profiles +set profile_name=profile + +:: Main process + +:: Remove archive +del %save_path%\%file_name% + +:: Save profile +%sevenz_exe% a %save_path%\%file_name% %firefox_data_path%\%profile_name% + +exit