0
1
OS: Windows 7 64-bit
I have three batch files.
- FirefoxBackup.bat
- ThunderbirdBackup.bat
- Firefox_Thunderbird_Backup.bat
The script inside Firefox_Thunderbird_Backup.bat
is shown below:
@echo off
@echo Welcome to Firefox and Thunderbird Automated Backup!
CALL "D:\Scripts\FirefoxBackup.bat"
CALL "D:\Scripts\ThunderbirdBackup.bat"
The script inside FirefoxBackup.bat
file is very similar to ThunderbirdBackup.bat
. Kindly see Firefox backup batch script below:
@echo off
@echo Firefox backup will begin shortly!
echo.
@echo Deleting old Firefox backup file(s)...
@echo off
DEL /F "D:\Mozilla Products Backups\Firefox*.pcv"
TIMEOUT /T 2 /NOBREAK
echo.
@echo off
@echo Firefox is quitting...
TIMEOUT /T 2 /NOBREAK
@echo off
@echo off tasklist /nh /fi "imagename eq firefox.exe" | find /i "firefox.exe" >nul && ( taskkill /f /im firefox.exe /T )
TIMEOUT /T 3 /NOBREAK
echo.
@echo Firefox backup is in progress!
START "" "C:\Program Files (x86)\MozBackup\MozBackup.exe" "D:\Scripts\Default.firefoxprofile"
TIMEOUT /T 15 /NOBREAK
echo.
@echo Firefox backup successful!
echo.
@echo Firefox has re-launched.
echo.
START "" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
The part I'm interested in is:
START "" "C:\Program Files\MozBackup\MozBackup.exe" "D:\Scripts\Default.firefoxprofile"
TIMEOUT /T 15 /NOBREAK
Explanation on the above code snippet:
MozBackup.exe is started along with a parameter. This parameter is the Default.firefoxprofile
file which MozBackup understands, and can be manually edited as per the instructions here.
Intentions:
I'd like to get rid of the manual waiting time (15s) and make use of START /wait
. This way, Firefox re-launches only after Mozbackup finishes executing. I am not sure how to go about this considering there are already 3 parameters, namely ""
, C:\Program Files\MozBackup\MozBackup.exe
, and D:\Default.firefoxprofile
. Is it possible to achieve that at all anyway?
Thank you!
What makes you think you can't use more than 3 parameters with Start? – Ƭᴇcʜιᴇ007 – 2014-01-26T18:21:07.300
I tried. It didn't work and I deduced that maybe I'm passing too many parameters. – Ugo – 2014-01-26T18:22:18.193