There was a small typo in the batch file: It should be ":restart" and not
"restart:".
:restart
"C:\Program Files\FreeFileSync\FreeFileSync.exe" H:\my_sync_job.ffs_batch
@if not errorlevel 0 (
goto restart
)
Moreover I suggest to always include some "pause" statements when setting up a
batch file and returning some texts via "echo" to ensure everything works as
expected. In the above case the following error was issued, which makes the
problem immediately clear:
'restart' is not recognized as an internal or external command,
operable program or batch file.
HandleError - need to retry
- Site Admin
- Posts: 7279
- Joined: 9 Dec 2007
- Posts: 19
- Joined: 31 Mar 2010
You're right, this works like a charm:
:restart
"C:\Program Files\FreeFileSync\FreeFileSync.exe" "C:\Program
Files\FreeFileSync\SyncIL-UA.ffs_batch"
@if not errorlevel 0 (
sleep 2
goto restart
)
:restart
"C:\Program Files\FreeFileSync\FreeFileSync.exe" "C:\Program
Files\FreeFileSync\SyncIL-UA.ffs_batch"
@if not errorlevel 0 (
sleep 2
goto restart
)