Hi,
How can I setup a batch job, so that when it's complete, it will restart the PC.
From what I can see is that "ON COMPLETION:" dropdown list (in the SAVE AS BATCH JOB dialog), there is LOG OFF, STANDBY and SHUTDOWN, but NO RESTART.
So how can I tell the batch to restart the PC?
Thanks
restart after batch is complete?
- Posts: 2
- Joined: 22 Nov 2016
- Posts: 17
- Joined: 20 Oct 2016
Well, you could run FFS from a script. When you save your batch job, perhaps set:
Handle Errors=Stop
On Completion=Close progress dialogue
If you are using windows, create a BAT file that contains something like this:
Create a shortcut to that BAT file passing the path & filename of your "ffs_batch" job file as the first parameter. Then you can restart your computer after running whatever FFS batch job you like by creating different shortcuts for your different batch jobs.
Handle Errors=Stop
On Completion=Close progress dialogue
If you are using windows, create a BAT file that contains something like this:
@echo off
REM Run FFS batch job as specified by first parameter
"%programfiles%\FreeFileSync\FreeFileSync.exe" %1
if %ERRORLEVEL% EQU 0 goto RESTART
echo Error running FFS
goto END
:RESTART
echo Restart
shutdown -r -t 15
:END
- Site Admin
- Posts: 7210
- Joined: 9 Dec 2007
Or just enter "shutdown /r /t 60" in the "on completion" box. No need to pick any of the predefined values.
- Posts: 2
- Joined: 22 Nov 2016
Thank you! Simple and elegant solution